add TextBox control
now you can clear and verify the text of textbox
This commit is contained in:
1 parent
9c5174c7a2
commit
bc2bd5413c
35 files changed
+368
-134
No files matched your search
@@ -98,7 +98,7 @@ namespace HandyControl.Controls
|
|||||||
#region Public Properties
|
#region Public Properties
|
||||||
|
|
||||||
public static readonly DependencyProperty SelectedTimeProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty SelectedTimeProperty = DependencyProperty.Register(
|
||||||
"SelectedTime", typeof(DateTime?), typeof(Clock), new PropertyMetadata(default(DateTime), OnSelectedTimeChanged));
|
"SelectedTime", typeof(DateTime?), typeof(Clock), new PropertyMetadata(default(DateTime?), OnSelectedTimeChanged));
|
||||||
|
|
||||||
private static void OnSelectedTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
private static void OnSelectedTimeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -239,6 +239,17 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
_appliedTemplate = true;
|
_appliedTemplate = true;
|
||||||
|
if (_isLoaded)
|
||||||
|
{
|
||||||
|
if (SelectedTime.HasValue)
|
||||||
|
{
|
||||||
|
Update(SelectedTime.Value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DisplayTime = DateTime.Now;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Public Methods
|
#endregion Public Methods
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ using HandyControl.Data;
|
|||||||
using HandyControl.Interactivity;
|
using HandyControl.Interactivity;
|
||||||
using HandyControl.Tools.Extension;
|
using HandyControl.Tools.Extension;
|
||||||
|
|
||||||
// ReSharper disable once CheckNamespace
|
|
||||||
namespace HandyControl.Controls
|
namespace HandyControl.Controls
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -359,6 +358,8 @@ namespace HandyControl.Controls
|
|||||||
_sliderOpacity.ValueChanged -= SliderOpacity_OnValueChanged;
|
_sliderOpacity.ValueChanged -= SliderOpacity_OnValueChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_panelColor?.Children.Clear();
|
||||||
|
|
||||||
_panelRgb?.RemoveHandler(NumericUpDown.ValueChangedEvent, new EventHandler<FunctionEventArgs<double>>(NumericUpDownRgb_OnValueChanged));
|
_panelRgb?.RemoveHandler(NumericUpDown.ValueChangedEvent, new EventHandler<FunctionEventArgs<double>>(NumericUpDownRgb_OnValueChanged));
|
||||||
|
|
||||||
base.OnApplyTemplate();
|
base.OnApplyTemplate();
|
||||||
@@ -391,6 +392,10 @@ namespace HandyControl.Controls
|
|||||||
collection.Add(behavior);
|
collection.Add(behavior);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_isLoaded)
|
||||||
|
{
|
||||||
|
Init();
|
||||||
|
}
|
||||||
_panelRgb?.AddHandler(NumericUpDown.ValueChangedEvent, new EventHandler<FunctionEventArgs<double>>(NumericUpDownRgb_OnValueChanged));
|
_panelRgb?.AddHandler(NumericUpDown.ValueChangedEvent, new EventHandler<FunctionEventArgs<double>>(NumericUpDownRgb_OnValueChanged));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
using System;
|
|
||||||
using HandyControl.Data;
|
|
||||||
|
|
||||||
namespace HandyControl.Controls
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 表示可以成为一个数据输入控件
|
|
||||||
/// </summary>
|
|
||||||
public interface IDataInput
|
|
||||||
{
|
|
||||||
bool VerifyData();
|
|
||||||
|
|
||||||
Func<string, OperationResult<bool>> VerifyFunc { get; set; }
|
|
||||||
|
|
||||||
bool IsError { get; set; }
|
|
||||||
|
|
||||||
string ErrorStr { get; set; }
|
|
||||||
|
|
||||||
TextType TextType { get; set; }
|
|
||||||
|
|
||||||
bool ShowClearButton { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
using System;
|
||||||
|
using HandyControl.Data;
|
||||||
|
|
||||||
|
// ReSharper disable once CheckNamespace
|
||||||
|
namespace HandyControl.Controls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 表示可以成为一个数据输入控件
|
||||||
|
/// </summary>
|
||||||
|
public interface IDataInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 验证数据
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
bool VerifyData();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据验证委托
|
||||||
|
/// </summary>
|
||||||
|
Func<string, OperationResult<bool>> VerifyFunc { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据是否错误
|
||||||
|
/// </summary>
|
||||||
|
bool IsError { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 错误提示
|
||||||
|
/// </summary>
|
||||||
|
string ErrorStr { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文本类型
|
||||||
|
/// </summary>
|
||||||
|
TextType TextType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否显示清除按钮
|
||||||
|
/// </summary>
|
||||||
|
bool ShowClearButton { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+9
-19
@@ -5,8 +5,10 @@ using System.Windows.Input;
|
|||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
using HandyControl.Interactivity;
|
using HandyControl.Interactivity;
|
||||||
|
|
||||||
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControl.Controls
|
namespace HandyControl.Controls
|
||||||
{
|
{
|
||||||
|
/// <inheritdoc cref="IDataInput" />
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数值选择控件
|
/// 数值选择控件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -25,6 +27,11 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
#endregion Data
|
#endregion Data
|
||||||
|
|
||||||
|
static NumericUpDown()
|
||||||
|
{
|
||||||
|
DefaultStyleKeyProperty.OverrideMetadata(typeof(NumericUpDown), new FrameworkPropertyMetadata(typeof(NumericUpDown)));
|
||||||
|
}
|
||||||
|
|
||||||
public NumericUpDown()
|
public NumericUpDown()
|
||||||
{
|
{
|
||||||
CommandBindings.Add(new CommandBinding(ControlCommands.Prev, (s, e) =>
|
CommandBindings.Add(new CommandBinding(ControlCommands.Prev, (s, e) =>
|
||||||
@@ -44,6 +51,8 @@ namespace HandyControl.Controls
|
|||||||
ClearValue(ValueProperty);
|
ClearValue(ValueProperty);
|
||||||
_textBox.Text = string.Empty;
|
_textBox.Text = string.Empty;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
Loaded += (s, e) => OnApplyTemplate();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnGotFocus(RoutedEventArgs e)
|
protected override void OnGotFocus(RoutedEventArgs e)
|
||||||
@@ -309,9 +318,6 @@ namespace HandyControl.Controls
|
|||||||
public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
|
||||||
"IsError", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(default(bool)));
|
"IsError", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(default(bool)));
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 数据是否错误
|
|
||||||
/// </summary>
|
|
||||||
public bool IsError
|
public bool IsError
|
||||||
{
|
{
|
||||||
get => (bool) GetValue(IsErrorProperty);
|
get => (bool) GetValue(IsErrorProperty);
|
||||||
@@ -324,9 +330,6 @@ namespace HandyControl.Controls
|
|||||||
public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
|
||||||
"ErrorStr", typeof(string), typeof(NumericUpDown), new PropertyMetadata(default(string)));
|
"ErrorStr", typeof(string), typeof(NumericUpDown), new PropertyMetadata(default(string)));
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 错误提示
|
|
||||||
/// </summary>
|
|
||||||
public string ErrorStr
|
public string ErrorStr
|
||||||
{
|
{
|
||||||
get => (string) GetValue(ErrorStrProperty);
|
get => (string) GetValue(ErrorStrProperty);
|
||||||
@@ -339,9 +342,6 @@ namespace HandyControl.Controls
|
|||||||
public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
|
||||||
"TextType", typeof(TextType), typeof(NumericUpDown), new PropertyMetadata(default(TextType)));
|
"TextType", typeof(TextType), typeof(NumericUpDown), new PropertyMetadata(default(TextType)));
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 文本类型
|
|
||||||
/// </summary>
|
|
||||||
public TextType TextType
|
public TextType TextType
|
||||||
{
|
{
|
||||||
get => (TextType) GetValue(TextTypeProperty);
|
get => (TextType) GetValue(TextTypeProperty);
|
||||||
@@ -354,24 +354,14 @@ namespace HandyControl.Controls
|
|||||||
public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
|
||||||
"ShowClearButton", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(default(bool)));
|
"ShowClearButton", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(default(bool)));
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 是否显示清除按钮
|
|
||||||
/// </summary>
|
|
||||||
public bool ShowClearButton
|
public bool ShowClearButton
|
||||||
{
|
{
|
||||||
get => (bool) GetValue(ShowClearButtonProperty);
|
get => (bool) GetValue(ShowClearButtonProperty);
|
||||||
set => SetValue(ShowClearButtonProperty, value);
|
set => SetValue(ShowClearButtonProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 数据验证委托
|
|
||||||
/// </summary>
|
|
||||||
public Func<string, OperationResult<bool>> VerifyFunc { get; set; }
|
public Func<string, OperationResult<bool>> VerifyFunc { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 验证数据
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public virtual bool VerifyData()
|
public virtual bool VerifyData()
|
||||||
{
|
{
|
||||||
OperationResult<bool> result;
|
OperationResult<bool> result;
|
||||||
@@ -1,8 +1,115 @@
|
|||||||
// ReSharper disable once CheckNamespace
|
using System;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using HandyControl.Data;
|
||||||
|
using HandyControl.Interactivity;
|
||||||
|
using HandyControl.Tools;
|
||||||
|
|
||||||
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControl.Controls
|
namespace HandyControl.Controls
|
||||||
{
|
{
|
||||||
public class TextBox : System.Windows.Controls.TextBox
|
public class TextBox : System.Windows.Controls.TextBox, IDataInput
|
||||||
{
|
{
|
||||||
|
public TextBox()
|
||||||
|
{
|
||||||
|
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
|
||||||
|
{
|
||||||
|
ClearValue(TextProperty);
|
||||||
|
Text = string.Empty;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnTextChanged(TextChangedEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnTextChanged(e);
|
||||||
|
VerifyData();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Func<string, OperationResult<bool>> VerifyFunc { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数据是否错误
|
||||||
|
/// </summary>
|
||||||
|
public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
|
||||||
|
"IsError", typeof(bool), typeof(TextBox), new PropertyMetadata(default(bool)));
|
||||||
|
|
||||||
|
public bool IsError
|
||||||
|
{
|
||||||
|
get => (bool) GetValue(IsErrorProperty);
|
||||||
|
set => SetValue(IsErrorProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 错误提示
|
||||||
|
/// </summary>
|
||||||
|
public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
|
||||||
|
"ErrorStr", typeof(string), typeof(TextBox), new PropertyMetadata(default(string)));
|
||||||
|
|
||||||
|
public string ErrorStr
|
||||||
|
{
|
||||||
|
get => (string) GetValue(ErrorStrProperty);
|
||||||
|
set => SetValue(ErrorStrProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文本类型
|
||||||
|
/// </summary>
|
||||||
|
public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
|
||||||
|
"TextType", typeof(TextType), typeof(TextBox), new PropertyMetadata(default(TextType)));
|
||||||
|
|
||||||
|
public TextType TextType
|
||||||
|
{
|
||||||
|
get => (TextType) GetValue(TextTypeProperty);
|
||||||
|
set => SetValue(TextTypeProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否显示清除按钮
|
||||||
|
/// </summary>
|
||||||
|
public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
|
||||||
|
"ShowClearButton", typeof(bool), typeof(TextBox), new PropertyMetadata(default(bool)));
|
||||||
|
|
||||||
|
public bool ShowClearButton
|
||||||
|
{
|
||||||
|
get => (bool) GetValue(ShowClearButtonProperty);
|
||||||
|
set => SetValue(ShowClearButtonProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual bool VerifyData()
|
||||||
|
{
|
||||||
|
OperationResult<bool> result;
|
||||||
|
|
||||||
|
if (VerifyFunc != null)
|
||||||
|
{
|
||||||
|
result = VerifyFunc.Invoke(Text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(Text))
|
||||||
|
{
|
||||||
|
if (TextType != TextType.Common)
|
||||||
|
{
|
||||||
|
result = Text.IsKindOf(TextType) ? OperationResult.Success() : OperationResult.Failed(Properties.Langs.Lang.FormatError);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = OperationResult.Success();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (InfoElement.GetNecessary(this))
|
||||||
|
{
|
||||||
|
result = OperationResult.Failed(Properties.Langs.Lang.IsNecessary);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result = OperationResult.Success();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IsError = !result.Data;
|
||||||
|
ErrorStr = result.Message;
|
||||||
|
return result.Data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File renamed without changes.
@@ -7,9 +7,6 @@ using System.Windows.Shapes;
|
|||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControl.Controls
|
namespace HandyControl.Controls
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// LoadingLine.xaml 的交互逻辑
|
|
||||||
/// </summary>
|
|
||||||
public class LoadingLine : LoadingBase
|
public class LoadingLine : LoadingBase
|
||||||
{
|
{
|
||||||
private const double MoveLength = 80;
|
private const double MoveLength = 80;
|
||||||
|
|||||||
@@ -67,12 +67,18 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
public override void OnApplyTemplate()
|
public override void OnApplyTemplate()
|
||||||
{
|
{
|
||||||
|
_panelMain?.Children.Clear();
|
||||||
base.OnApplyTemplate();
|
base.OnApplyTemplate();
|
||||||
|
|
||||||
_progressBarBack = GetTemplateChild(ElementProgressBarBack) as ProgressBar;
|
_progressBarBack = GetTemplateChild(ElementProgressBarBack) as ProgressBar;
|
||||||
_panelMain = GetTemplateChild(ElementUniformGridMain) as Panel;
|
_panelMain = GetTemplateChild(ElementUniformGridMain) as Panel;
|
||||||
|
|
||||||
CheckNull();
|
CheckNull();
|
||||||
|
|
||||||
|
if (_isLoaded)
|
||||||
|
{
|
||||||
|
UpdateItems(Items);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheckNull()
|
private void CheckNull()
|
||||||
|
|||||||
@@ -150,12 +150,14 @@ namespace HandyControl.Controls
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private double _totalOffsetX;
|
private double _totalOffsetX;
|
||||||
|
|
||||||
|
private readonly bool _isLoaded;
|
||||||
|
|
||||||
public TimeBar()
|
public TimeBar()
|
||||||
{
|
{
|
||||||
_starTime = DateTime.Now;
|
_starTime = DateTime.Now;
|
||||||
SelectedTime = new DateTime(_starTime.Year, _starTime.Month, _starTime.Day, 0, 0, 0);
|
SelectedTime = new DateTime(_starTime.Year, _starTime.Month, _starTime.Day, 0, 0, 0);
|
||||||
_starTime = SelectedTime;
|
_starTime = SelectedTime;
|
||||||
|
_isLoaded = true;
|
||||||
SizeChanged += TimeBar_OnSizeChanged;
|
SizeChanged += TimeBar_OnSizeChanged;
|
||||||
MouseMove += TimeBar_OnMouseMove;
|
MouseMove += TimeBar_OnMouseMove;
|
||||||
}
|
}
|
||||||
@@ -188,6 +190,10 @@ namespace HandyControl.Controls
|
|||||||
var collection = Interaction.GetBehaviors(_borderTop);
|
var collection = Interaction.GetBehaviors(_borderTop);
|
||||||
collection.Add(behavior);
|
collection.Add(behavior);
|
||||||
|
|
||||||
|
if (_isLoaded)
|
||||||
|
{
|
||||||
|
TimeBar_OnSizeChanged(null, null);
|
||||||
|
}
|
||||||
_textBlockSelected.Text = SelectedTime.ToString(TimeFormat);
|
_textBlockSelected.Text = SelectedTime.ToString(TimeFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,14 +51,14 @@
|
|||||||
<Compile Include="Controls\Clock\Clock.cs" />
|
<Compile Include="Controls\Clock\Clock.cs" />
|
||||||
<Compile Include="Controls\Clock\ClockRadioButton.cs" />
|
<Compile Include="Controls\Clock\ClockRadioButton.cs" />
|
||||||
<Compile Include="Controls\Growl.cs" />
|
<Compile Include="Controls\Growl.cs" />
|
||||||
<Compile Include="Controls\IDataInput.cs" />
|
<Compile Include="Controls\Input\IDataInput.cs" />
|
||||||
<Compile Include="Controls\Input\TextBox.cs" />
|
<Compile Include="Controls\Input\TextBox.cs" />
|
||||||
<Compile Include="Controls\ISingleOpen.cs" />
|
<Compile Include="Controls\ISingleOpen.cs" />
|
||||||
<Compile Include="Controls\NumericUpDown.cs" />
|
<Compile Include="Controls\Input\NumericUpDown.cs" />
|
||||||
<Compile Include="Controls\Pagination.cs" />
|
<Compile Include="Controls\Pagination.cs" />
|
||||||
<Compile Include="Controls\Attach\IconElement.cs" />
|
<Compile Include="Controls\Attach\IconElement.cs" />
|
||||||
<Compile Include="Controls\Slider\CompareSlider.cs" />
|
<Compile Include="Controls\Slider\CompareSlider.cs" />
|
||||||
<Compile Include="Controls\Picker\ColorPicker.cs" />
|
<Compile Include="Controls\ColorPicker.cs" />
|
||||||
<Compile Include="Controls\Slider\PreviewSlider.cs" />
|
<Compile Include="Controls\Slider\PreviewSlider.cs" />
|
||||||
<Compile Include="Controls\ScrollViewer.cs" />
|
<Compile Include="Controls\ScrollViewer.cs" />
|
||||||
<Compile Include="Controls\Loading\LoadingBase.cs" />
|
<Compile Include="Controls\Loading\LoadingBase.cs" />
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
<Compile Include="Controls\TabControl\TabItem.cs" />
|
<Compile Include="Controls\TabControl\TabItem.cs" />
|
||||||
<Compile Include="Controls\TabControl\TabPanel.cs" />
|
<Compile Include="Controls\TabControl\TabPanel.cs" />
|
||||||
<Compile Include="Controls\TimeBar\SpeTextBlock.cs" />
|
<Compile Include="Controls\TimeBar\SpeTextBlock.cs" />
|
||||||
<Compile Include="Controls\Picker\TimePicker.cs" />
|
<Compile Include="Controls\Input\TimePicker.cs" />
|
||||||
<Compile Include="Controls\TimeBar\TimeBar.cs" />
|
<Compile Include="Controls\TimeBar\TimeBar.cs" />
|
||||||
<Compile Include="Controls\TransitioningContentControl.cs" />
|
<Compile Include="Controls\TransitioningContentControl.cs" />
|
||||||
<Compile Include="Controls\WatermarkTextBox.cs" />
|
<Compile Include="Controls\WatermarkTextBox.cs" />
|
||||||
|
|||||||
@@ -452,7 +452,7 @@
|
|||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="RepeatButton">
|
<ControlTemplate TargetType="RepeatButton">
|
||||||
<Border Background="Transparent" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
|
<Border Background="Transparent" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
|
||||||
<Rectangle Fill="{TemplateBinding Background}" Height="2"/>
|
<Rectangle StrokeThickness="0" Fill="{TemplateBinding Background}" Height="2"/>
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
@@ -468,7 +468,7 @@
|
|||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="RepeatButton">
|
<ControlTemplate TargetType="RepeatButton">
|
||||||
<Border Background="Transparent" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
|
<Border Background="Transparent" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
|
||||||
<Rectangle Fill="{TemplateBinding Background}" Width="2"/>
|
<Rectangle StrokeThickness="0" Fill="{TemplateBinding Background}" Width="2"/>
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
@@ -646,7 +646,7 @@
|
|||||||
<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonHorizontalStyle}"/>
|
<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonHorizontalStyle}"/>
|
||||||
</Track.IncreaseRepeatButton>
|
</Track.IncreaseRepeatButton>
|
||||||
<Track.Thumb>
|
<Track.Thumb>
|
||||||
<Thumb ClipToBounds="False" Width="18" Margin="-9,0,-9,0" Height="18" x:Name="Thumb" Focusable="False" OverridesDefaultStyle="True" Template="{StaticResource SliderThumb}" VerticalAlignment="Center"/>
|
<Thumb ClipToBounds="False" Width="18" Margin="-9,0" Height="18" x:Name="Thumb" Focusable="False" OverridesDefaultStyle="True" Template="{StaticResource SliderThumb}" VerticalAlignment="Center"/>
|
||||||
</Track.Thumb>
|
</Track.Thumb>
|
||||||
</Track>
|
</Track>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -701,7 +701,7 @@
|
|||||||
<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonVerticalStyle}"/>
|
<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource SliderRepeatButtonVerticalStyle}"/>
|
||||||
</Track.IncreaseRepeatButton>
|
</Track.IncreaseRepeatButton>
|
||||||
<Track.Thumb>
|
<Track.Thumb>
|
||||||
<Thumb Margin="0,-9" x:Name="Thumb" Focusable="False" Height="18" OverridesDefaultStyle="True" Template="{StaticResource SliderThumb}" VerticalAlignment="Top" Width="18"/>
|
<Thumb Margin="0,-9" x:Name="Thumb" Focusable="False" Height="18" OverridesDefaultStyle="True" Template="{StaticResource SliderThumb}" HorizontalAlignment="Center" Width="18"/>
|
||||||
</Track.Thumb>
|
</Track.Thumb>
|
||||||
</Track>
|
</Track>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -722,11 +722,9 @@
|
|||||||
</MultiTrigger>
|
</MultiTrigger>
|
||||||
<Trigger Property="TickPlacement" Value="TopLeft">
|
<Trigger Property="TickPlacement" Value="TopLeft">
|
||||||
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
||||||
<Setter Property="Margin" TargetName="TrackBackground" Value="2,5,0,5"/>
|
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="TickPlacement" Value="BottomRight">
|
<Trigger Property="TickPlacement" Value="BottomRight">
|
||||||
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
|
||||||
<Setter Property="Margin" TargetName="TrackBackground" Value="0,5,2,5"/>
|
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="TickPlacement" Value="Both">
|
<Trigger Property="TickPlacement" Value="Both">
|
||||||
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:controls="clr-namespace:HandyControl.Controls"
|
xmlns:controls="clr-namespace:HandyControl.Controls"
|
||||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||||
|
xmlns:interactivity="clr-namespace:HandyControl.Interactivity">
|
||||||
|
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
|
||||||
|
<ResourceDictionary Source="Button.xaml"/>
|
||||||
<ResourceDictionary Source="Base/TextBoxBaseStyle.xaml"/>
|
<ResourceDictionary Source="Base/TextBoxBaseStyle.xaml"/>
|
||||||
<ResourceDictionary Source="TextBlock.xaml"/>
|
<ResourceDictionary Source="TextBlock.xaml"/>
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
@@ -80,55 +83,121 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<ControlTemplate x:Key="TextBoxPlusTopTemplate" TargetType="controls:TextBox">
|
<ControlTemplate x:Key="TextBoxPlusTopTemplate" TargetType="controls:TextBox">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardShow">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="8,0,0,-18" Duration="0:0:.2"/>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardHidden">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="8,0,0,4" Duration="0:0:0"/>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="{Binding Path=(controls:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<RowDefinition Height="{Binding Path=(controls:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="7,4">
|
<TextBlock Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="8,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Row="1"/>
|
||||||
|
<StackPanel Grid.Row="0" Visibility="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="7,4">
|
||||||
<TextBlock Foreground="{DynamicResource PrimaryTextBrush}" Margin="1,0,0,0" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<TextBlock Foreground="{DynamicResource PrimaryTextBrush}" Margin="1,0,0,0" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Border x:Name="border" Grid.Row="1" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
<TextBlock VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="8" Grid.Row="1" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<Grid SnapsToDevicePixels="true">
|
||||||
<ScrollViewer Padding="7,0" Margin="1,1,1,2" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Row="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="7,8" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ScrollViewer Grid.Column="0" Padding="7,0" Margin="0,0,0,1" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
|
<Button Command="interactivity:ControlCommands.Clear" Margin="0,0,7,0" Visibility="Collapsed" Name="ButtonClear" Width="16" Grid.Column="1" Style="{StaticResource ButtonIcon}" Padding="0,6" controls:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{Binding BorderBrush,ElementName=templateRoot}"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsEnabled" Value="false">
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
|
<Setter Property="Opacity" TargetName="templateRoot" Value="0.4"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsMouseOver" Value="true" SourceName="PART_ContentHost">
|
<Trigger Property="IsMouseOver" Value="true" SourceName="templateRoot">
|
||||||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource SecondaryBorderBrush}"/>
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="templateRoot"/>
|
||||||
|
<Condition Property="ShowClearButton" Value="True"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="ButtonClear"/>
|
||||||
|
</MultiTrigger>
|
||||||
<Trigger Property="IsFocused" Value="true">
|
<Trigger Property="IsFocused" Value="true">
|
||||||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsError" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardShow}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardHidden}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|
||||||
<ControlTemplate x:Key="TextBoxPlusLeftTemplate" TargetType="controls:TextBox">
|
<ControlTemplate x:Key="TextBoxPlusLeftTemplate" TargetType="controls:TextBox">
|
||||||
|
<ControlTemplate.Resources>
|
||||||
|
<Storyboard x:Key="StoryboardShow">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="8,0,0,-18" Duration="0:0:.2"/>
|
||||||
|
</Storyboard>
|
||||||
|
<Storyboard x:Key="StoryboardHidden">
|
||||||
|
<ThicknessAnimation Storyboard.TargetName="TextBlockError" Storyboard.TargetProperty="Margin" To="8,0,0,4" Duration="0:0:0"/>
|
||||||
|
</Storyboard>
|
||||||
|
</ControlTemplate.Resources>
|
||||||
<Grid Height="{Binding Path=(controls:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}">
|
<Grid Height="{Binding Path=(controls:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="{Binding Path=(controls:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<ColumnDefinition Width="{Binding Path=(controls:InfoElement.TitleWidth),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Visibility="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,8">
|
<TextBlock Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="8,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1"/>
|
||||||
|
<StackPanel Grid.Column="0" Visibility="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,8">
|
||||||
<TextBlock Foreground="{DynamicResource PrimaryTextBrush}" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<TextBlock Foreground="{DynamicResource PrimaryTextBrush}" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Border x:Name="border" Grid.Column="1" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
<TextBlock VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="8,7,8,8" Grid.Column="1" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<Grid SnapsToDevicePixels="true">
|
||||||
<ScrollViewer Grid.Column="1" Padding="7,0" Margin="1,1,1,2" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="7,8" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
|
<ScrollViewer Grid.Column="0" Padding="7,0" Margin="0,0,0,1" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
|
<Button Command="interactivity:ControlCommands.Clear" Margin="0,0,7,0" Visibility="Collapsed" Name="ButtonClear" Width="16" Grid.Column="1" Style="{StaticResource ButtonIcon}" Padding="0,6" controls:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{Binding BorderBrush,ElementName=templateRoot}"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsEnabled" Value="false">
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
<Setter Property="Opacity" TargetName="border" Value="0.4"/>
|
<Setter Property="Opacity" TargetName="templateRoot" Value="0.4"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsMouseOver" Value="true" SourceName="PART_ContentHost">
|
<Trigger Property="IsMouseOver" Value="true" SourceName="templateRoot">
|
||||||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource SecondaryBorderBrush}"/>
|
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsMouseOver" Value="true" SourceName="templateRoot"/>
|
||||||
|
<Condition Property="ShowClearButton" Value="True"/>
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter Property="Visibility" Value="Visible" TargetName="ButtonClear"/>
|
||||||
|
</MultiTrigger>
|
||||||
<Trigger Property="IsFocused" Value="true">
|
<Trigger Property="IsFocused" Value="true">
|
||||||
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource PrimaryBrush}"/>
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource PrimaryBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsError" Value="true">
|
||||||
|
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource DangerBrush}"/>
|
||||||
|
<Trigger.EnterActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardShow}"/>
|
||||||
|
</Trigger.EnterActions>
|
||||||
|
<Trigger.ExitActions>
|
||||||
|
<BeginStoryboard Storyboard="{StaticResource StoryboardHidden}"/>
|
||||||
|
</Trigger.ExitActions>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|||||||
@@ -38,6 +38,8 @@
|
|||||||
|
|
||||||
public static readonly string CircleProgressBarDemoCtl = nameof(CircleProgressBarDemoCtl);
|
public static readonly string CircleProgressBarDemoCtl = nameof(CircleProgressBarDemoCtl);
|
||||||
|
|
||||||
|
public static readonly string TextBoxDemoCtl = nameof(TextBoxDemoCtl);
|
||||||
|
|
||||||
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
||||||
|
|
||||||
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
|
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
|
||||||
@@ -52,7 +54,7 @@
|
|||||||
|
|
||||||
public static readonly string DatePickerDemoCtl = nameof(DatePickerDemoCtl);
|
public static readonly string DatePickerDemoCtl = nameof(DatePickerDemoCtl);
|
||||||
|
|
||||||
public static readonly string TextBoxDemoCtl = nameof(TextBoxDemoCtl);
|
public static readonly string NaiveTextBoxDemoCtl = nameof(NaiveTextBoxDemoCtl);
|
||||||
|
|
||||||
public static readonly string TextBlockDemoCtl = nameof(TextBlockDemoCtl);
|
public static readonly string TextBlockDemoCtl = nameof(TextBlockDemoCtl);
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ var controlList = new List<string>
|
|||||||
"WindowDemoCtl",
|
"WindowDemoCtl",
|
||||||
"ScrollViewerDemoCtl",
|
"ScrollViewerDemoCtl",
|
||||||
"PreviewSliderDemoCtl",
|
"PreviewSliderDemoCtl",
|
||||||
"CircleProgressBarDemoCtl"
|
"CircleProgressBarDemoCtl",
|
||||||
|
"TextBoxDemoCtl"
|
||||||
};
|
};
|
||||||
var styleList = new List<string>
|
var styleList = new List<string>
|
||||||
{
|
{
|
||||||
@@ -32,7 +33,7 @@ var styleList = new List<string>
|
|||||||
"TabControlDemoCtl",
|
"TabControlDemoCtl",
|
||||||
"CalendarDemoCtl",
|
"CalendarDemoCtl",
|
||||||
"DatePickerDemoCtl",
|
"DatePickerDemoCtl",
|
||||||
"TextBoxDemoCtl",
|
"NaiveTextBoxDemoCtl",
|
||||||
"TextBlockDemoCtl",
|
"TextBlockDemoCtl",
|
||||||
"ComboBoxDemoCtl",
|
"ComboBoxDemoCtl",
|
||||||
"PasswordBoxDemoCtl",
|
"PasswordBoxDemoCtl",
|
||||||
|
|||||||
@@ -137,6 +137,9 @@
|
|||||||
<Compile Include="UserControl\Controls\StepBarDemoCtl.xaml.cs">
|
<Compile Include="UserControl\Controls\StepBarDemoCtl.xaml.cs">
|
||||||
<DependentUpon>StepBarDemoCtl.xaml</DependentUpon>
|
<DependentUpon>StepBarDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="UserControl\Controls\TextBoxDemoCtl.xaml.cs">
|
||||||
|
<DependentUpon>TextBoxDemoCtl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="UserControl\Controls\TimePickerDemoCtl.xaml.cs">
|
<Compile Include="UserControl\Controls\TimePickerDemoCtl.xaml.cs">
|
||||||
<DependentUpon>TimePickerDemoCtl.xaml</DependentUpon>
|
<DependentUpon>TimePickerDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -218,8 +221,8 @@
|
|||||||
<Compile Include="UserControl\Styles\TextBlockDemoCtl.xaml.cs">
|
<Compile Include="UserControl\Styles\TextBlockDemoCtl.xaml.cs">
|
||||||
<DependentUpon>TextBlockDemoCtl.xaml</DependentUpon>
|
<DependentUpon>TextBlockDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="UserControl\Styles\TextBoxDemoCtl.xaml.cs">
|
<Compile Include="UserControl\Styles\NaiveTextBoxDemoCtl.xaml.cs">
|
||||||
<DependentUpon>TextBoxDemoCtl.xaml</DependentUpon>
|
<DependentUpon>NaiveTextBoxDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="UserControl\Styles\ToggleButtonDemoCtl.xaml.cs">
|
<Compile Include="UserControl\Styles\ToggleButtonDemoCtl.xaml.cs">
|
||||||
<DependentUpon>ToggleButtonDemoCtl.xaml</DependentUpon>
|
<DependentUpon>ToggleButtonDemoCtl.xaml</DependentUpon>
|
||||||
@@ -356,6 +359,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="UserControl\Controls\TextBoxDemoCtl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="UserControl\Controls\TimePickerDemoCtl.xaml">
|
<Page Include="UserControl\Controls\TimePickerDemoCtl.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -464,7 +471,7 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="UserControl\Styles\TextBoxDemoCtl.xaml">
|
<Page Include="UserControl\Styles\NaiveTextBoxDemoCtl.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -600,6 +600,15 @@ namespace HandyControlDemo.Properties.Langs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 请输入邮箱 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string PlsEnterEmail {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("PlsEnterEmail", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 上一步 的本地化字符串。
|
/// 查找类似 上一步 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -393,4 +393,7 @@
|
|||||||
<data name="IsNotPhone" xml:space="preserve">
|
<data name="IsNotPhone" xml:space="preserve">
|
||||||
<value>It's not a phone number</value>
|
<value>It's not a phone number</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="PlsEnterEmail" xml:space="preserve">
|
||||||
|
<value>please enter email</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -373,4 +373,7 @@
|
|||||||
<data name="IsNotPhone" xml:space="preserve">
|
<data name="IsNotPhone" xml:space="preserve">
|
||||||
<value>不是手机号码</value>
|
<value>不是手机号码</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="PlsEnterEmail" xml:space="preserve">
|
||||||
|
<value>请输入邮箱</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// AnimationPathDemoCtl.xaml 的交互逻辑
|
|
||||||
/// </summary>
|
|
||||||
public partial class AnimationPathDemoCtl
|
public partial class AnimationPathDemoCtl
|
||||||
{
|
{
|
||||||
public AnimationPathDemoCtl()
|
public AnimationPathDemoCtl()
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// CarouselDemoCtl.xaml 的交互逻辑
|
|
||||||
/// </summary>
|
|
||||||
public partial class CarouselDemoCtl
|
public partial class CarouselDemoCtl
|
||||||
{
|
{
|
||||||
public CarouselDemoCtl()
|
public CarouselDemoCtl()
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// ClockDemoCtl.xaml 的交互逻辑
|
|
||||||
/// </summary>
|
|
||||||
public partial class ClockDemoCtl
|
public partial class ClockDemoCtl
|
||||||
{
|
{
|
||||||
public ClockDemoCtl()
|
public ClockDemoCtl()
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// ColorPickerDemoCtl.xaml 的交互逻辑
|
|
||||||
/// </summary>
|
|
||||||
public partial class ColorPickerDemoCtl
|
public partial class ColorPickerDemoCtl
|
||||||
{
|
{
|
||||||
public ColorPickerDemoCtl()
|
public ColorPickerDemoCtl()
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// CompareSliderDemoCtl.xaml 的交互逻辑
|
|
||||||
/// </summary>
|
|
||||||
public partial class CompareSliderDemoCtl
|
public partial class CompareSliderDemoCtl
|
||||||
{
|
{
|
||||||
public CompareSliderDemoCtl()
|
public CompareSliderDemoCtl()
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// LoadingDemoCtl.xaml 的交互逻辑
|
|
||||||
/// </summary>
|
|
||||||
public partial class LoadingDemoCtl
|
public partial class LoadingDemoCtl
|
||||||
{
|
{
|
||||||
public LoadingDemoCtl()
|
public LoadingDemoCtl()
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// PaginationDemoCtl.xaml 的交互逻辑
|
|
||||||
/// </summary>
|
|
||||||
public partial class PaginationDemoCtl
|
public partial class PaginationDemoCtl
|
||||||
{
|
{
|
||||||
public PaginationDemoCtl()
|
public PaginationDemoCtl()
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// TabControlDemoCtl.xaml 的交互逻辑
|
|
||||||
/// </summary>
|
|
||||||
public partial class TabControlDemoCtl
|
public partial class TabControlDemoCtl
|
||||||
{
|
{
|
||||||
public TabControlDemoCtl()
|
public TabControlDemoCtl()
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<UserControl x:Class="HandyControlDemo.UserControl.TextBoxDemoCtl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
Background="{DynamicResource RegionBrush}"
|
||||||
|
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||||
|
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||||
|
<controls:TransitioningContentControl>
|
||||||
|
<StackPanel Margin="32">
|
||||||
|
<controls:TextBox ShowClearButton="True" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||||
|
<controls:TextBox Text="{x:Static langs:Lang.ContentDemoStr}" Margin="0,16,0,0" IsEnabled="False"/>
|
||||||
|
|
||||||
|
<controls:TextBox ShowClearButton="True" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||||
|
<controls:TextBox TextType="Mail" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterEmail}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||||
|
<controls:TextBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
||||||
|
<controls:TextBox ShowClearButton="True" Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
</controls:TransitioningContentControl>
|
||||||
|
</UserControl>
|
||||||
-3
@@ -1,9 +1,6 @@
|
|||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// TextBoxDemoCtl.xaml 的交互逻辑
|
|
||||||
/// </summary>
|
|
||||||
public partial class TextBoxDemoCtl
|
public partial class TextBoxDemoCtl
|
||||||
{
|
{
|
||||||
public TextBoxDemoCtl()
|
public TextBoxDemoCtl()
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// TimeBarDemoCtl.xaml 的交互逻辑
|
|
||||||
/// </summary>
|
|
||||||
public partial class TimeBarDemoCtl
|
public partial class TimeBarDemoCtl
|
||||||
{
|
{
|
||||||
public TimeBarDemoCtl()
|
public TimeBarDemoCtl()
|
||||||
|
|||||||
@@ -129,6 +129,11 @@
|
|||||||
<Image Source="../../Resources/Img/LeftMainContent/NumericListBox_16x.png"/>
|
<Image Source="../../Resources/Img/LeftMainContent/NumericListBox_16x.png"/>
|
||||||
</controls:EdgeElement.LeftContent>
|
</controls:EdgeElement.LeftContent>
|
||||||
</ListBoxItem>
|
</ListBoxItem>
|
||||||
|
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.TextBoxDemoCtl}" Content="{x:Static langs:Lang.TextBox}">
|
||||||
|
<controls:EdgeElement.LeftContent>
|
||||||
|
<Image Source="../../Resources/Img/LeftMainContent/TextBox_16x.png"/>
|
||||||
|
</controls:EdgeElement.LeftContent>
|
||||||
|
</ListBoxItem>
|
||||||
<ListBoxItem Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}">
|
<ListBoxItem Tag="{x:Static data:MessageToken.CirclePanelDemoCtl}" Content="{x:Static langs:Lang.CirclePanel}">
|
||||||
<controls:EdgeElement.LeftContent>
|
<controls:EdgeElement.LeftContent>
|
||||||
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
|
<Image Source="../../Resources/Img/LeftMainContent/ColorWheel_16x.png"/>
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<UserControl x:Class="HandyControlDemo.UserControl.NaiveTextBoxDemoCtl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||||
|
Background="{DynamicResource RegionBrush}">
|
||||||
|
<controls:TransitioningContentControl>
|
||||||
|
<StackPanel Margin="32">
|
||||||
|
<TextBox Text="{Binding ContentDemoStr,Source={StaticResource LangProvider},Mode=OneWay}"/>
|
||||||
|
<TextBox Text="{Binding ContentDemoStr,Source={StaticResource LangProvider},Mode=OneWay}" Margin="0,16,0,0" IsEnabled="False"/>
|
||||||
|
|
||||||
|
<TextBox controls:InfoElement.Title="{Binding TitleDemoStr1,Source={StaticResource LangProvider}}" Style="{StaticResource TextBoxExtend}" Margin="0,32,0,0" Text="{Binding ContentDemoStr,Source={StaticResource LangProvider},Mode=OneWay}"/>
|
||||||
|
<TextBox controls:InfoElement.Placeholder="{Binding PlsEnterContent,Source={StaticResource LangProvider}}" controls:InfoElement.Title="{Binding TitleDemoStr2,Source={StaticResource LangProvider}}" Style="{StaticResource TextBoxExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
||||||
|
<TextBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{Binding TitleDemoStr3,Source={StaticResource LangProvider}}" Style="{StaticResource TextBoxExtend}" Margin="0,32,0,0" Text="{Binding ContentDemoStr,Source={StaticResource LangProvider},Mode=OneWay}"/>
|
||||||
|
<TextBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{Binding PlsEnterContent,Source={StaticResource LangProvider}}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{Binding TitleDemoStr3,Source={StaticResource LangProvider}}" controls:InfoElement.Necessary="True" Style="{StaticResource TextBoxExtend}" Margin="0,16,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
</controls:TransitioningContentControl>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
// ReSharper disable once CheckNamespace
|
||||||
|
namespace HandyControlDemo.UserControl
|
||||||
|
{
|
||||||
|
public partial class NaiveTextBoxDemoCtl
|
||||||
|
{
|
||||||
|
public NaiveTextBoxDemoCtl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace HandyControlDemo.UserControl
|
namespace HandyControlDemo.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// ProgressBarDemoCtl.xaml 的交互逻辑
|
|
||||||
/// </summary>
|
|
||||||
public partial class ProgressBarDemoCtl
|
public partial class ProgressBarDemoCtl
|
||||||
{
|
{
|
||||||
public ProgressBarDemoCtl()
|
public ProgressBarDemoCtl()
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
<UserControl x:Class="HandyControlDemo.UserControl.TextBoxDemoCtl"
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
|
||||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
|
||||||
Background="{DynamicResource RegionBrush}">
|
|
||||||
<controls:TransitioningContentControl>
|
|
||||||
<StackPanel Margin="32">
|
|
||||||
<TextBox Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
|
||||||
<TextBox Text="{x:Static langs:Lang.ContentDemoStr}" Margin="0,16,0,0" IsEnabled="False"/>
|
|
||||||
|
|
||||||
<TextBox controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Style="{StaticResource TextBoxExtend}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
|
||||||
<TextBox controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" Style="{StaticResource TextBoxExtend}" controls:InfoElement.Necessary="True" Margin="0,16,0,0"/>
|
|
||||||
<TextBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Style="{StaticResource TextBoxExtend}" Margin="0,32,0,0" Text="{x:Static langs:Lang.ContentDemoStr}"/>
|
|
||||||
<TextBox Width="380" controls:InfoElement.TitleWidth="140" controls:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" controls:InfoElement.TitleAlignment="Left" controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" controls:InfoElement.Necessary="True" Style="{StaticResource TextBoxExtend}" Margin="0,16,0,0"/>
|
|
||||||
</StackPanel>
|
|
||||||
</controls:TransitioningContentControl>
|
|
||||||
</UserControl>
|
|
||||||
Reference in new issue
Block a user