添加项目文件。
This commit is contained in:
57
Wpf.Ui.Extend/Controls/TextBoxEx/TextBoxEx.xaml.cs
Normal file
57
Wpf.Ui.Extend/Controls/TextBoxEx/TextBoxEx.xaml.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Wpf.Ui.Extend.Controls
|
||||
{
|
||||
public class TextBoxEx : Wpf.Ui.Controls.TextBox
|
||||
{
|
||||
static TextBoxEx()
|
||||
{
|
||||
DefaultStyleKeyProperty.OverrideMetadata(typeof(TextBoxEx), new FrameworkPropertyMetadata(typeof(TextBoxEx)));
|
||||
}
|
||||
|
||||
public string Prefix
|
||||
{
|
||||
get { return (string)GetValue(PrefixProperty); }
|
||||
set { SetValue(PrefixProperty, value); }
|
||||
}
|
||||
|
||||
// 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));
|
||||
|
||||
|
||||
|
||||
public string Suffix
|
||||
{
|
||||
get { return (string)GetValue(SuffixProperty); }
|
||||
set { SetValue(SuffixProperty, value); }
|
||||
}
|
||||
|
||||
// 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));
|
||||
|
||||
|
||||
|
||||
public string Header
|
||||
{
|
||||
get { return (string)GetValue(HeaderProperty); }
|
||||
set { SetValue(HeaderProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty HeaderProperty =
|
||||
DependencyProperty.Register(nameof(Header), typeof(string), typeof(TextBoxEx), new PropertyMetadata(null));
|
||||
|
||||
|
||||
public Dock HeaderPlacement
|
||||
{
|
||||
get { return (Dock)GetValue(HeaderPlacementProperty); }
|
||||
set { SetValue(HeaderPlacementProperty, value); }
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty HeaderPlacementProperty =
|
||||
DependencyProperty.Register(nameof(HeaderPlacement), typeof(Dock), typeof(TextBoxEx), new PropertyMetadata(Dock.Top));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user