优化更新代码,添加界面功能并整合

This commit is contained in:
GG Z
2025-02-10 20:53:40 +08:00
parent 83b846f15f
commit 978e03a67f
1389 changed files with 95739 additions and 22200 deletions

View File

@@ -0,0 +1,59 @@
using System.Windows.Controls;
namespace WPFluent.Controls
{
public class TextBoxEx : WPFluent.Controls.TextBox
{
public static readonly DependencyProperty HeaderPlacementProperty =
DependencyProperty.Register(
nameof(HeaderPlacement),
typeof(Dock),
typeof(TextBoxEx),
new PropertyMetadata(Dock.Top));
public static readonly DependencyProperty HeaderProperty =
DependencyProperty.Register(nameof(Header), typeof(string), typeof(TextBoxEx), new PropertyMetadata(null));
// Using a DependencyProperty as the backing store for Prefix. This enables animation, styling, binding, etc...
public static readonly DependencyProperty PrefixProperty =
DependencyProperty.Register(nameof(Prefix), typeof(string), typeof(TextBoxEx), new PropertyMetadata(null));
// Using a DependencyProperty as the backing store for Suffix. This enables animation, styling, binding, etc...
public static readonly DependencyProperty SuffixProperty =
DependencyProperty.Register(nameof(Suffix), typeof(string), typeof(TextBoxEx), new PropertyMetadata(null));
static TextBoxEx()
{
DefaultStyleKeyProperty.OverrideMetadata(
typeof(TextBoxEx),
new FrameworkPropertyMetadata(typeof(TextBoxEx)));
}
public string Header
{
get { return (string)GetValue(HeaderProperty); }
set { SetValue(HeaderProperty, value); }
}
public Dock HeaderPlacement
{
get { return (Dock)GetValue(HeaderPlacementProperty); }
set { SetValue(HeaderPlacementProperty, value); }
}
public string Prefix
{
get { return (string)GetValue(PrefixProperty); }
set { SetValue(PrefixProperty, value); }
}
public string Suffix
{
get { return (string)GetValue(SuffixProperty); }
set { SetValue(SuffixProperty, value); }
}
}
}