From bc2bd5413c840e0861ad1ec83e3568b4688c9cfc Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Thu, 8 Nov 2018 14:28:23 +0800
Subject: [PATCH] add TextBox control
now you can clear and verify the text of textbox
---
HandyControl/Controls/Clock/Clock.cs | 13 +-
.../Controls/{Picker => }/ColorPicker.cs | 7 +-
HandyControl/Controls/IDataInput.cs | 23 ----
HandyControl/Controls/Input/IDataInput.cs | 43 +++++++
.../Controls/{ => Input}/NumericUpDown.cs | 28 ++---
HandyControl/Controls/Input/TextBox.cs | 113 +++++++++++++++++-
.../Controls/{Picker => Input}/TimePicker.cs | 0
HandyControl/Controls/Loading/LoadingLine.cs | 3 -
HandyControl/Controls/Steps/StepBar.cs | 6 +
HandyControl/Controls/TimeBar/TimeBar.cs | 8 +-
HandyControl/HandyControl.csproj | 8 +-
HandyControl/Themes/Styles/Slider.xaml | 10 +-
HandyControl/Themes/Styles/TextBox.xaml | 103 +++++++++++++---
HandyControlDemo/Data/MessageToken.cs | 4 +-
HandyControlDemo/Data/MessageToken.tt | 5 +-
HandyControlDemo/HandyControlDemo.csproj | 13 +-
.../Properties/Langs/Lang.Designer.cs | 9 ++
.../Properties/Langs/Lang.en.resx | 3 +
HandyControlDemo/Properties/Langs/Lang.resx | 3 +
.../Controls/AnimationPathDemoCtl.xaml.cs | 3 -
.../Controls/CarouselDemoCtl.xaml.cs | 3 -
.../UserControl/Controls/ClockDemoCtl.xaml.cs | 3 -
.../Controls/ColorPickerDemoCtl.xaml.cs | 3 -
.../Controls/CompareSliderDemoCtl.xaml.cs | 3 -
.../Controls/LoadingDemoCtl.xaml.cs | 3 -
.../Controls/PaginationDemoCtl.xaml.cs | 3 -
.../Controls/TabControlDemoCtl.xaml.cs | 3 -
.../UserControl/Controls/TextBoxDemoCtl.xaml | 18 +++
.../TextBoxDemoCtl.xaml.cs | 3 -
.../Controls/TimeBarDemoCtl.xaml.cs | 3 -
.../UserControl/Main/LeftMainContent.xaml | 5 +
.../Styles/NaiveTextBoxDemoCtl.xaml | 17 +++
.../Styles/NaiveTextBoxDemoCtl.xaml.cs | 11 ++
.../Styles/ProgressBarDemoCtl.xaml.cs | 3 -
.../UserControl/Styles/TextBoxDemoCtl.xaml | 18 ---
35 files changed, 369 insertions(+), 135 deletions(-)
rename HandyControl/Controls/{Picker => }/ColorPicker.cs (99%)
delete mode 100644 HandyControl/Controls/IDataInput.cs
create mode 100644 HandyControl/Controls/Input/IDataInput.cs
rename HandyControl/Controls/{ => Input}/NumericUpDown.cs (96%)
rename HandyControl/Controls/{Picker => Input}/TimePicker.cs (100%)
create mode 100644 HandyControlDemo/UserControl/Controls/TextBoxDemoCtl.xaml
rename HandyControlDemo/UserControl/{Styles => Controls}/TextBoxDemoCtl.xaml.cs (73%)
create mode 100644 HandyControlDemo/UserControl/Styles/NaiveTextBoxDemoCtl.xaml
create mode 100644 HandyControlDemo/UserControl/Styles/NaiveTextBoxDemoCtl.xaml.cs
delete mode 100644 HandyControlDemo/UserControl/Styles/TextBoxDemoCtl.xaml
diff --git a/HandyControl/Controls/Clock/Clock.cs b/HandyControl/Controls/Clock/Clock.cs
index ec82730a..cf7707bb 100644
--- a/HandyControl/Controls/Clock/Clock.cs
+++ b/HandyControl/Controls/Clock/Clock.cs
@@ -98,7 +98,7 @@ namespace HandyControl.Controls
#region Public Properties
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)
{
@@ -239,6 +239,17 @@ namespace HandyControl.Controls
}
_appliedTemplate = true;
+ if (_isLoaded)
+ {
+ if (SelectedTime.HasValue)
+ {
+ Update(SelectedTime.Value);
+ }
+ else
+ {
+ DisplayTime = DateTime.Now;
+ }
+ }
}
#endregion Public Methods
diff --git a/HandyControl/Controls/Picker/ColorPicker.cs b/HandyControl/Controls/ColorPicker.cs
similarity index 99%
rename from HandyControl/Controls/Picker/ColorPicker.cs
rename to HandyControl/Controls/ColorPicker.cs
index 87448489..51a426ec 100644
--- a/HandyControl/Controls/Picker/ColorPicker.cs
+++ b/HandyControl/Controls/ColorPicker.cs
@@ -9,7 +9,6 @@ using HandyControl.Data;
using HandyControl.Interactivity;
using HandyControl.Tools.Extension;
-// ReSharper disable once CheckNamespace
namespace HandyControl.Controls
{
///
@@ -359,6 +358,8 @@ namespace HandyControl.Controls
_sliderOpacity.ValueChanged -= SliderOpacity_OnValueChanged;
}
+ _panelColor?.Children.Clear();
+
_panelRgb?.RemoveHandler(NumericUpDown.ValueChangedEvent, new EventHandler>(NumericUpDownRgb_OnValueChanged));
base.OnApplyTemplate();
@@ -391,6 +392,10 @@ namespace HandyControl.Controls
collection.Add(behavior);
}
+ if (_isLoaded)
+ {
+ Init();
+ }
_panelRgb?.AddHandler(NumericUpDown.ValueChangedEvent, new EventHandler>(NumericUpDownRgb_OnValueChanged));
}
diff --git a/HandyControl/Controls/IDataInput.cs b/HandyControl/Controls/IDataInput.cs
deleted file mode 100644
index 66f39b04..00000000
--- a/HandyControl/Controls/IDataInput.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-using HandyControl.Data;
-
-namespace HandyControl.Controls
-{
- ///
- /// 表示可以成为一个数据输入控件
- ///
- public interface IDataInput
- {
- bool VerifyData();
-
- Func> VerifyFunc { get; set; }
-
- bool IsError { get; set; }
-
- string ErrorStr { get; set; }
-
- TextType TextType { get; set; }
-
- bool ShowClearButton { get; set; }
- }
-}
\ No newline at end of file
diff --git a/HandyControl/Controls/Input/IDataInput.cs b/HandyControl/Controls/Input/IDataInput.cs
new file mode 100644
index 00000000..8ea26c94
--- /dev/null
+++ b/HandyControl/Controls/Input/IDataInput.cs
@@ -0,0 +1,43 @@
+using System;
+using HandyControl.Data;
+
+// ReSharper disable once CheckNamespace
+namespace HandyControl.Controls
+{
+ ///
+ /// 表示可以成为一个数据输入控件
+ ///
+ public interface IDataInput
+ {
+ ///
+ /// 验证数据
+ ///
+ ///
+ bool VerifyData();
+
+ ///
+ /// 数据验证委托
+ ///
+ Func> VerifyFunc { get; set; }
+
+ ///
+ /// 数据是否错误
+ ///
+ bool IsError { get; set; }
+
+ ///
+ /// 错误提示
+ ///
+ string ErrorStr { get; set; }
+
+ ///
+ /// 文本类型
+ ///
+ TextType TextType { get; set; }
+
+ ///
+ /// 是否显示清除按钮
+ ///
+ bool ShowClearButton { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/HandyControl/Controls/NumericUpDown.cs b/HandyControl/Controls/Input/NumericUpDown.cs
similarity index 96%
rename from HandyControl/Controls/NumericUpDown.cs
rename to HandyControl/Controls/Input/NumericUpDown.cs
index 6fe737a1..54fa7130 100644
--- a/HandyControl/Controls/NumericUpDown.cs
+++ b/HandyControl/Controls/Input/NumericUpDown.cs
@@ -5,8 +5,10 @@ using System.Windows.Input;
using HandyControl.Data;
using HandyControl.Interactivity;
+// ReSharper disable once CheckNamespace
namespace HandyControl.Controls
{
+ ///
///
/// 数值选择控件
///
@@ -25,6 +27,11 @@ namespace HandyControl.Controls
#endregion Data
+ static NumericUpDown()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata(typeof(NumericUpDown), new FrameworkPropertyMetadata(typeof(NumericUpDown)));
+ }
+
public NumericUpDown()
{
CommandBindings.Add(new CommandBinding(ControlCommands.Prev, (s, e) =>
@@ -44,6 +51,8 @@ namespace HandyControl.Controls
ClearValue(ValueProperty);
_textBox.Text = string.Empty;
}));
+
+ Loaded += (s, e) => OnApplyTemplate();
}
protected override void OnGotFocus(RoutedEventArgs e)
@@ -309,9 +318,6 @@ namespace HandyControl.Controls
public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
"IsError", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(default(bool)));
- ///
- /// 数据是否错误
- ///
public bool IsError
{
get => (bool) GetValue(IsErrorProperty);
@@ -324,9 +330,6 @@ namespace HandyControl.Controls
public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
"ErrorStr", typeof(string), typeof(NumericUpDown), new PropertyMetadata(default(string)));
- ///
- /// 错误提示
- ///
public string ErrorStr
{
get => (string) GetValue(ErrorStrProperty);
@@ -339,9 +342,6 @@ namespace HandyControl.Controls
public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
"TextType", typeof(TextType), typeof(NumericUpDown), new PropertyMetadata(default(TextType)));
- ///
- /// 文本类型
- ///
public TextType TextType
{
get => (TextType) GetValue(TextTypeProperty);
@@ -354,24 +354,14 @@ namespace HandyControl.Controls
public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
"ShowClearButton", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(default(bool)));
- ///
- /// 是否显示清除按钮
- ///
public bool ShowClearButton
{
get => (bool) GetValue(ShowClearButtonProperty);
set => SetValue(ShowClearButtonProperty, value);
}
- ///
- /// 数据验证委托
- ///
public Func> VerifyFunc { get; set; }
- ///
- /// 验证数据
- ///
- ///
public virtual bool VerifyData()
{
OperationResult result;
diff --git a/HandyControl/Controls/Input/TextBox.cs b/HandyControl/Controls/Input/TextBox.cs
index 96fd0046..e3224c98 100644
--- a/HandyControl/Controls/Input/TextBox.cs
+++ b/HandyControl/Controls/Input/TextBox.cs
@@ -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
{
- 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> VerifyFunc { get; set; }
+
+ ///
+ /// 数据是否错误
+ ///
+ 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);
+ }
+
+ ///
+ /// 错误提示
+ ///
+ 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);
+ }
+
+ ///
+ /// 文本类型
+ ///
+ 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);
+ }
+
+ ///
+ /// 是否显示清除按钮
+ ///
+ 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 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;
+ }
}
}
\ No newline at end of file
diff --git a/HandyControl/Controls/Picker/TimePicker.cs b/HandyControl/Controls/Input/TimePicker.cs
similarity index 100%
rename from HandyControl/Controls/Picker/TimePicker.cs
rename to HandyControl/Controls/Input/TimePicker.cs
diff --git a/HandyControl/Controls/Loading/LoadingLine.cs b/HandyControl/Controls/Loading/LoadingLine.cs
index 9f98a7c6..6edbf977 100644
--- a/HandyControl/Controls/Loading/LoadingLine.cs
+++ b/HandyControl/Controls/Loading/LoadingLine.cs
@@ -7,9 +7,6 @@ using System.Windows.Shapes;
// ReSharper disable once CheckNamespace
namespace HandyControl.Controls
{
- ///
- /// LoadingLine.xaml 的交互逻辑
- ///
public class LoadingLine : LoadingBase
{
private const double MoveLength = 80;
diff --git a/HandyControl/Controls/Steps/StepBar.cs b/HandyControl/Controls/Steps/StepBar.cs
index 57696860..15654df5 100644
--- a/HandyControl/Controls/Steps/StepBar.cs
+++ b/HandyControl/Controls/Steps/StepBar.cs
@@ -67,12 +67,18 @@ namespace HandyControl.Controls
public override void OnApplyTemplate()
{
+ _panelMain?.Children.Clear();
base.OnApplyTemplate();
_progressBarBack = GetTemplateChild(ElementProgressBarBack) as ProgressBar;
_panelMain = GetTemplateChild(ElementUniformGridMain) as Panel;
CheckNull();
+
+ if (_isLoaded)
+ {
+ UpdateItems(Items);
+ }
}
private void CheckNull()
diff --git a/HandyControl/Controls/TimeBar/TimeBar.cs b/HandyControl/Controls/TimeBar/TimeBar.cs
index 83ba1e63..ffce6df7 100644
--- a/HandyControl/Controls/TimeBar/TimeBar.cs
+++ b/HandyControl/Controls/TimeBar/TimeBar.cs
@@ -150,12 +150,14 @@ namespace HandyControl.Controls
///
private double _totalOffsetX;
+ private readonly bool _isLoaded;
+
public TimeBar()
{
_starTime = DateTime.Now;
SelectedTime = new DateTime(_starTime.Year, _starTime.Month, _starTime.Day, 0, 0, 0);
_starTime = SelectedTime;
-
+ _isLoaded = true;
SizeChanged += TimeBar_OnSizeChanged;
MouseMove += TimeBar_OnMouseMove;
}
@@ -188,6 +190,10 @@ namespace HandyControl.Controls
var collection = Interaction.GetBehaviors(_borderTop);
collection.Add(behavior);
+ if (_isLoaded)
+ {
+ TimeBar_OnSizeChanged(null, null);
+ }
_textBlockSelected.Text = SelectedTime.ToString(TimeFormat);
}
diff --git a/HandyControl/HandyControl.csproj b/HandyControl/HandyControl.csproj
index 98311e31..465401dc 100644
--- a/HandyControl/HandyControl.csproj
+++ b/HandyControl/HandyControl.csproj
@@ -51,14 +51,14 @@
-
+
-
+
-
+
@@ -116,7 +116,7 @@
-
+
diff --git a/HandyControl/Themes/Styles/Slider.xaml b/HandyControl/Themes/Styles/Slider.xaml
index 37ab1339..c4fd9975 100644
--- a/HandyControl/Themes/Styles/Slider.xaml
+++ b/HandyControl/Themes/Styles/Slider.xaml
@@ -452,7 +452,7 @@
-
+
@@ -468,7 +468,7 @@
-
+
@@ -646,7 +646,7 @@
-
+
@@ -701,7 +701,7 @@
-
+
@@ -722,11 +722,9 @@
-
-
diff --git a/HandyControl/Themes/Styles/TextBox.xaml b/HandyControl/Themes/Styles/TextBox.xaml
index 13ddbdd4..0692ea55 100644
--- a/HandyControl/Themes/Styles/TextBox.xaml
+++ b/HandyControl/Themes/Styles/TextBox.xaml
@@ -1,9 +1,12 @@
+ xmlns:system="clr-namespace:System;assembly=mscorlib"
+ xmlns:interactivity="clr-namespace:HandyControl.Interactivity">
+
+
@@ -80,55 +83,121 @@
+
+
+
+
+
+
+
+
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/HandyControlDemo/Data/MessageToken.cs b/HandyControlDemo/Data/MessageToken.cs
index b2e54754..b8105dbe 100644
--- a/HandyControlDemo/Data/MessageToken.cs
+++ b/HandyControlDemo/Data/MessageToken.cs
@@ -38,6 +38,8 @@
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 ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
@@ -52,7 +54,7 @@
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);
diff --git a/HandyControlDemo/Data/MessageToken.tt b/HandyControlDemo/Data/MessageToken.tt
index 3f7b98ff..e558d7c2 100644
--- a/HandyControlDemo/Data/MessageToken.tt
+++ b/HandyControlDemo/Data/MessageToken.tt
@@ -21,7 +21,8 @@ var controlList = new List
"WindowDemoCtl",
"ScrollViewerDemoCtl",
"PreviewSliderDemoCtl",
- "CircleProgressBarDemoCtl"
+ "CircleProgressBarDemoCtl",
+ "TextBoxDemoCtl"
};
var styleList = new List
{
@@ -32,7 +33,7 @@ var styleList = new List
"TabControlDemoCtl",
"CalendarDemoCtl",
"DatePickerDemoCtl",
- "TextBoxDemoCtl",
+ "NaiveTextBoxDemoCtl",
"TextBlockDemoCtl",
"ComboBoxDemoCtl",
"PasswordBoxDemoCtl",
diff --git a/HandyControlDemo/HandyControlDemo.csproj b/HandyControlDemo/HandyControlDemo.csproj
index cb3c5e42..7103694b 100644
--- a/HandyControlDemo/HandyControlDemo.csproj
+++ b/HandyControlDemo/HandyControlDemo.csproj
@@ -137,6 +137,9 @@
StepBarDemoCtl.xaml
+
+ TextBoxDemoCtl.xaml
+
TimePickerDemoCtl.xaml
@@ -218,8 +221,8 @@
TextBlockDemoCtl.xaml
-
- TextBoxDemoCtl.xaml
+
+ NaiveTextBoxDemoCtl.xaml
ToggleButtonDemoCtl.xaml
@@ -356,6 +359,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -464,7 +471,7 @@
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
diff --git a/HandyControlDemo/Properties/Langs/Lang.Designer.cs b/HandyControlDemo/Properties/Langs/Lang.Designer.cs
index fec18810..23798ae4 100644
--- a/HandyControlDemo/Properties/Langs/Lang.Designer.cs
+++ b/HandyControlDemo/Properties/Langs/Lang.Designer.cs
@@ -600,6 +600,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
+ ///
+ /// 查找类似 请输入邮箱 的本地化字符串。
+ ///
+ public static string PlsEnterEmail {
+ get {
+ return ResourceManager.GetString("PlsEnterEmail", resourceCulture);
+ }
+ }
+
///
/// 查找类似 上一步 的本地化字符串。
///
diff --git a/HandyControlDemo/Properties/Langs/Lang.en.resx b/HandyControlDemo/Properties/Langs/Lang.en.resx
index 50b779ca..f570ea38 100644
--- a/HandyControlDemo/Properties/Langs/Lang.en.resx
+++ b/HandyControlDemo/Properties/Langs/Lang.en.resx
@@ -393,4 +393,7 @@
It's not a phone number
+
+ please enter email
+
\ No newline at end of file
diff --git a/HandyControlDemo/Properties/Langs/Lang.resx b/HandyControlDemo/Properties/Langs/Lang.resx
index ed6b2efe..e12ce8eb 100644
--- a/HandyControlDemo/Properties/Langs/Lang.resx
+++ b/HandyControlDemo/Properties/Langs/Lang.resx
@@ -373,4 +373,7 @@
不是手机号码
+
+ 请输入邮箱
+
\ No newline at end of file
diff --git a/HandyControlDemo/UserControl/Controls/AnimationPathDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/AnimationPathDemoCtl.xaml.cs
index 04a99194..051e84ab 100644
--- a/HandyControlDemo/UserControl/Controls/AnimationPathDemoCtl.xaml.cs
+++ b/HandyControlDemo/UserControl/Controls/AnimationPathDemoCtl.xaml.cs
@@ -1,9 +1,6 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
- ///
- /// AnimationPathDemoCtl.xaml 的交互逻辑
- ///
public partial class AnimationPathDemoCtl
{
public AnimationPathDemoCtl()
diff --git a/HandyControlDemo/UserControl/Controls/CarouselDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/CarouselDemoCtl.xaml.cs
index 8fccc343..5da1be02 100644
--- a/HandyControlDemo/UserControl/Controls/CarouselDemoCtl.xaml.cs
+++ b/HandyControlDemo/UserControl/Controls/CarouselDemoCtl.xaml.cs
@@ -1,9 +1,6 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
- ///
- /// CarouselDemoCtl.xaml 的交互逻辑
- ///
public partial class CarouselDemoCtl
{
public CarouselDemoCtl()
diff --git a/HandyControlDemo/UserControl/Controls/ClockDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/ClockDemoCtl.xaml.cs
index 508fd8bb..4966caa7 100644
--- a/HandyControlDemo/UserControl/Controls/ClockDemoCtl.xaml.cs
+++ b/HandyControlDemo/UserControl/Controls/ClockDemoCtl.xaml.cs
@@ -1,9 +1,6 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
- ///
- /// ClockDemoCtl.xaml 的交互逻辑
- ///
public partial class ClockDemoCtl
{
public ClockDemoCtl()
diff --git a/HandyControlDemo/UserControl/Controls/ColorPickerDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/ColorPickerDemoCtl.xaml.cs
index e2b28ee2..8a3a4688 100644
--- a/HandyControlDemo/UserControl/Controls/ColorPickerDemoCtl.xaml.cs
+++ b/HandyControlDemo/UserControl/Controls/ColorPickerDemoCtl.xaml.cs
@@ -1,9 +1,6 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
- ///
- /// ColorPickerDemoCtl.xaml 的交互逻辑
- ///
public partial class ColorPickerDemoCtl
{
public ColorPickerDemoCtl()
diff --git a/HandyControlDemo/UserControl/Controls/CompareSliderDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/CompareSliderDemoCtl.xaml.cs
index fd80f4d8..8e95d831 100644
--- a/HandyControlDemo/UserControl/Controls/CompareSliderDemoCtl.xaml.cs
+++ b/HandyControlDemo/UserControl/Controls/CompareSliderDemoCtl.xaml.cs
@@ -1,9 +1,6 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
- ///
- /// CompareSliderDemoCtl.xaml 的交互逻辑
- ///
public partial class CompareSliderDemoCtl
{
public CompareSliderDemoCtl()
diff --git a/HandyControlDemo/UserControl/Controls/LoadingDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/LoadingDemoCtl.xaml.cs
index 5d05c65a..4b48ed98 100644
--- a/HandyControlDemo/UserControl/Controls/LoadingDemoCtl.xaml.cs
+++ b/HandyControlDemo/UserControl/Controls/LoadingDemoCtl.xaml.cs
@@ -1,9 +1,6 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
- ///
- /// LoadingDemoCtl.xaml 的交互逻辑
- ///
public partial class LoadingDemoCtl
{
public LoadingDemoCtl()
diff --git a/HandyControlDemo/UserControl/Controls/PaginationDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/PaginationDemoCtl.xaml.cs
index 10466553..468fe6ae 100644
--- a/HandyControlDemo/UserControl/Controls/PaginationDemoCtl.xaml.cs
+++ b/HandyControlDemo/UserControl/Controls/PaginationDemoCtl.xaml.cs
@@ -1,9 +1,6 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
- ///
- /// PaginationDemoCtl.xaml 的交互逻辑
- ///
public partial class PaginationDemoCtl
{
public PaginationDemoCtl()
diff --git a/HandyControlDemo/UserControl/Controls/TabControlDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/TabControlDemoCtl.xaml.cs
index 86ce60ba..ea2987d3 100644
--- a/HandyControlDemo/UserControl/Controls/TabControlDemoCtl.xaml.cs
+++ b/HandyControlDemo/UserControl/Controls/TabControlDemoCtl.xaml.cs
@@ -1,9 +1,6 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
- ///
- /// TabControlDemoCtl.xaml 的交互逻辑
- ///
public partial class TabControlDemoCtl
{
public TabControlDemoCtl()
diff --git a/HandyControlDemo/UserControl/Controls/TextBoxDemoCtl.xaml b/HandyControlDemo/UserControl/Controls/TextBoxDemoCtl.xaml
new file mode 100644
index 00000000..3f111f30
--- /dev/null
+++ b/HandyControlDemo/UserControl/Controls/TextBoxDemoCtl.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Styles/TextBoxDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/TextBoxDemoCtl.xaml.cs
similarity index 73%
rename from HandyControlDemo/UserControl/Styles/TextBoxDemoCtl.xaml.cs
rename to HandyControlDemo/UserControl/Controls/TextBoxDemoCtl.xaml.cs
index dec61bbe..9740a22c 100644
--- a/HandyControlDemo/UserControl/Styles/TextBoxDemoCtl.xaml.cs
+++ b/HandyControlDemo/UserControl/Controls/TextBoxDemoCtl.xaml.cs
@@ -1,9 +1,6 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
- ///
- /// TextBoxDemoCtl.xaml 的交互逻辑
- ///
public partial class TextBoxDemoCtl
{
public TextBoxDemoCtl()
diff --git a/HandyControlDemo/UserControl/Controls/TimeBarDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/TimeBarDemoCtl.xaml.cs
index 497ccc44..b4da06a3 100644
--- a/HandyControlDemo/UserControl/Controls/TimeBarDemoCtl.xaml.cs
+++ b/HandyControlDemo/UserControl/Controls/TimeBarDemoCtl.xaml.cs
@@ -1,9 +1,6 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
- ///
- /// TimeBarDemoCtl.xaml 的交互逻辑
- ///
public partial class TimeBarDemoCtl
{
public TimeBarDemoCtl()
diff --git a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
index 0639799c..ac904bce 100644
--- a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
+++ b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
@@ -129,6 +129,11 @@
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Styles/NaiveTextBoxDemoCtl.xaml b/HandyControlDemo/UserControl/Styles/NaiveTextBoxDemoCtl.xaml
new file mode 100644
index 00000000..ff5343aa
--- /dev/null
+++ b/HandyControlDemo/UserControl/Styles/NaiveTextBoxDemoCtl.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Styles/NaiveTextBoxDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Styles/NaiveTextBoxDemoCtl.xaml.cs
new file mode 100644
index 00000000..6f3bf49b
--- /dev/null
+++ b/HandyControlDemo/UserControl/Styles/NaiveTextBoxDemoCtl.xaml.cs
@@ -0,0 +1,11 @@
+// ReSharper disable once CheckNamespace
+namespace HandyControlDemo.UserControl
+{
+ public partial class NaiveTextBoxDemoCtl
+ {
+ public NaiveTextBoxDemoCtl()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/HandyControlDemo/UserControl/Styles/ProgressBarDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Styles/ProgressBarDemoCtl.xaml.cs
index 35b5da79..32b303ac 100644
--- a/HandyControlDemo/UserControl/Styles/ProgressBarDemoCtl.xaml.cs
+++ b/HandyControlDemo/UserControl/Styles/ProgressBarDemoCtl.xaml.cs
@@ -1,9 +1,6 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
- ///
- /// ProgressBarDemoCtl.xaml 的交互逻辑
- ///
public partial class ProgressBarDemoCtl
{
public ProgressBarDemoCtl()
diff --git a/HandyControlDemo/UserControl/Styles/TextBoxDemoCtl.xaml b/HandyControlDemo/UserControl/Styles/TextBoxDemoCtl.xaml
deleted file mode 100644
index e63e4bd4..00000000
--- a/HandyControlDemo/UserControl/Styles/TextBoxDemoCtl.xaml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-