diff --git a/ChangeLog.txt b/ChangeLog.txt
index 796b7fc2..b9863c8d 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,15 @@
+2018.10.09 Version 1.3.1
+* new style
+ - add TextBox
+ - add ComboBox
+ - add PasswordBox
+ - add DataPicker
+ - add TimePicker
+
+* other
+ - add TextBlockDemo
+ - add CirclePanelDemo
+
2018.10.03 Version 1.3.0
* new controls
- add Clock
diff --git a/HandyControl/Controls/Attach/BackgroundSwitchElement.cs b/HandyControl/Controls/Attach/BackgroundSwitchElement.cs
index 1711f7d8..09da3666 100644
--- a/HandyControl/Controls/Attach/BackgroundSwitchElement.cs
+++ b/HandyControl/Controls/Attach/BackgroundSwitchElement.cs
@@ -7,29 +7,17 @@ namespace HandyControl.Controls
public class BackgroundSwitchElement : DependencyObject
{
public static readonly DependencyProperty MouseHoverBackgroundProperty = DependencyProperty.RegisterAttached(
- "MouseHoverBackground", typeof(Brush), typeof(BackgroundSwitchElement), new PropertyMetadata(Brushes.Transparent));
+ "MouseHoverBackground", typeof(Brush), typeof(BackgroundSwitchElement), new FrameworkPropertyMetadata(Brushes.Transparent, FrameworkPropertyMetadataOptions.Inherits));
- public static void SetMouseHoverBackground(DependencyObject element, Brush value)
- {
- element.SetValue(MouseHoverBackgroundProperty, value);
- }
+ public static void SetMouseHoverBackground(DependencyObject element, Brush value) => element.SetValue(MouseHoverBackgroundProperty, value);
- public static Brush GetMouseHoverBackground(DependencyObject element)
- {
- return (Brush)element.GetValue(MouseHoverBackgroundProperty);
- }
+ public static Brush GetMouseHoverBackground(DependencyObject element) => (Brush)element.GetValue(MouseHoverBackgroundProperty);
public static readonly DependencyProperty MouseDownBackgroundProperty = DependencyProperty.RegisterAttached(
- "MouseDownBackground", typeof(Brush), typeof(BackgroundSwitchElement), new PropertyMetadata(Brushes.Transparent));
+ "MouseDownBackground", typeof(Brush), typeof(BackgroundSwitchElement), new FrameworkPropertyMetadata(Brushes.Transparent, FrameworkPropertyMetadataOptions.Inherits));
- public static void SetMouseDownBackground(DependencyObject element, Brush value)
- {
- element.SetValue(MouseDownBackgroundProperty, value);
- }
+ public static void SetMouseDownBackground(DependencyObject element, Brush value) => element.SetValue(MouseDownBackgroundProperty, value);
- public static Brush GetMouseDownBackground(DependencyObject element)
- {
- return (Brush)element.GetValue(MouseDownBackgroundProperty);
- }
+ public static Brush GetMouseDownBackground(DependencyObject element) => (Brush)element.GetValue(MouseDownBackgroundProperty);
}
}
\ No newline at end of file
diff --git a/HandyControl/Controls/Attach/BorderElement.cs b/HandyControl/Controls/Attach/BorderElement.cs
index 77b24384..8868c3c2 100644
--- a/HandyControl/Controls/Attach/BorderElement.cs
+++ b/HandyControl/Controls/Attach/BorderElement.cs
@@ -6,16 +6,10 @@ namespace HandyControl.Controls
public class BorderElement : DependencyObject
{
public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.RegisterAttached(
- "CornerRadius", typeof(CornerRadius), typeof(BorderElement), new PropertyMetadata(default(CornerRadius)));
+ "CornerRadius", typeof(CornerRadius), typeof(BorderElement), new FrameworkPropertyMetadata(default(CornerRadius), FrameworkPropertyMetadataOptions.Inherits));
- public static void SetCornerRadius(DependencyObject element, CornerRadius value)
- {
- element.SetValue(CornerRadiusProperty, value);
- }
+ public static void SetCornerRadius(DependencyObject element, CornerRadius value) => element.SetValue(CornerRadiusProperty, value);
- public static CornerRadius GetCornerRadius(DependencyObject element)
- {
- return (CornerRadius) element.GetValue(CornerRadiusProperty);
- }
+ public static CornerRadius GetCornerRadius(DependencyObject element) => (CornerRadius)element.GetValue(CornerRadiusProperty);
}
}
\ No newline at end of file
diff --git a/HandyControl/Controls/Attach/InfoElement.cs b/HandyControl/Controls/Attach/InfoElement.cs
index 4af45fa7..04df5f96 100644
--- a/HandyControl/Controls/Attach/InfoElement.cs
+++ b/HandyControl/Controls/Attach/InfoElement.cs
@@ -6,6 +6,9 @@ namespace HandyControl.Controls
{
public class InfoElement : DependencyObject
{
+ ///
+ /// 标题
+ ///
public static readonly DependencyProperty TitleProperty = DependencyProperty.RegisterAttached(
"Title", typeof(string), typeof(InfoElement), new PropertyMetadata(default(string)));
@@ -13,18 +16,54 @@ namespace HandyControl.Controls
public static string GetTitle(DependencyObject element) => (string) element.GetValue(TitleProperty);
- public static readonly DependencyProperty RequiredProperty = DependencyProperty.RegisterAttached(
- "Required", typeof(bool), typeof(InfoElement), new PropertyMetadata(default(bool)));
+ ///
+ /// 占位符
+ ///
+ public static readonly DependencyProperty PlaceholderProperty = DependencyProperty.RegisterAttached(
+ "Placeholder", typeof(string), typeof(InfoElement), new PropertyMetadata(default(string)));
- public static void SetRequired(DependencyObject element, bool value) => element.SetValue(RequiredProperty, value);
+ public static void SetPlaceholder(DependencyObject element, string value) => element.SetValue(PlaceholderProperty, value);
- public static bool GetRequired(DependencyObject element) => (bool)element.GetValue(RequiredProperty);
+ public static string GetPlaceholder(DependencyObject element) => (string)element.GetValue(PlaceholderProperty);
+ ///
+ /// 是否必填
+ ///
+ public static readonly DependencyProperty NecessaryProperty = DependencyProperty.RegisterAttached(
+ "Necessary", typeof(bool), typeof(InfoElement), new FrameworkPropertyMetadata(default(bool), FrameworkPropertyMetadataOptions.Inherits));
+
+ public static void SetNecessary(DependencyObject element, bool value) => element.SetValue(NecessaryProperty, value);
+
+ public static bool GetNecessary(DependencyObject element) => (bool)element.GetValue(NecessaryProperty);
+
+ ///
+ /// 标记
+ ///
+ public static readonly DependencyProperty SymbolProperty = DependencyProperty.RegisterAttached(
+ "Symbol", typeof(string), typeof(InfoElement), new FrameworkPropertyMetadata(default(string), FrameworkPropertyMetadataOptions.Inherits));
+
+ public static void SetSymbol(DependencyObject element, string value) => element.SetValue(SymbolProperty, value);
+
+ public static string GetSymbol(DependencyObject element) => (string)element.GetValue(SymbolProperty);
+
+ ///
+ /// 标题对齐方式
+ ///
public static readonly DependencyProperty TitleAlignmentProperty = DependencyProperty.RegisterAttached(
- "TitleAlignment", typeof(TitleAlignment), typeof(InfoElement), new PropertyMetadata(default(TitleAlignment)));
+ "TitleAlignment", typeof(TitleAlignment), typeof(InfoElement), new FrameworkPropertyMetadata(TitleAlignment.Top, FrameworkPropertyMetadataOptions.Inherits));
public static void SetTitleAlignment(DependencyObject element, TitleAlignment value) => element.SetValue(TitleAlignmentProperty, value);
public static TitleAlignment GetTitleAlignment(DependencyObject element) => (TitleAlignment) element.GetValue(TitleAlignmentProperty);
+
+ ///
+ /// 标题宽度
+ ///
+ public static readonly DependencyProperty TitleWidthProperty = DependencyProperty.RegisterAttached(
+ "TitleWidth", typeof(GridLength), typeof(InfoElement), new FrameworkPropertyMetadata(new GridLength(120.0), FrameworkPropertyMetadataOptions.Inherits));
+
+ public static void SetTitleWidth(DependencyObject element, GridLength value) => element.SetValue(TitleWidthProperty, value);
+
+ public static GridLength GetTitleWidth(DependencyObject element) => (GridLength)element.GetValue(TitleWidthProperty);
}
}
\ No newline at end of file
diff --git a/HandyControl/Controls/Attach/PasswordBoxMonitor.cs b/HandyControl/Controls/Attach/PasswordBoxMonitor.cs
new file mode 100644
index 00000000..e1d3d6e4
--- /dev/null
+++ b/HandyControl/Controls/Attach/PasswordBoxMonitor.cs
@@ -0,0 +1,55 @@
+using System.Windows;
+using System.Windows.Controls;
+
+// ReSharper disable once CheckNamespace
+namespace HandyControl.Controls
+{
+ public class PasswordBoxMonitor
+ {
+ ///
+ /// 密码长度
+ ///
+ public static readonly DependencyProperty PasswordLengthProperty = DependencyProperty.RegisterAttached(
+ "PasswordLength", typeof(int), typeof(PasswordBoxMonitor), new PropertyMetadata(default(int)));
+
+ public static void SetPasswordLength(DependencyObject element, int value) => element.SetValue(PasswordLengthProperty, value);
+
+ public static int GetPasswordLength(DependencyObject element) => (int)element.GetValue(PasswordLengthProperty);
+
+ ///
+ /// 是否监测
+ ///
+ public static readonly DependencyProperty IsMonitoringProperty = DependencyProperty.RegisterAttached(
+ "IsMonitoring", typeof(bool), typeof(PasswordBoxMonitor), new FrameworkPropertyMetadata(default(bool), FrameworkPropertyMetadataOptions.Inherits, OnIsMonitoringChanged));
+
+ private static void OnIsMonitoringChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ if (d is PasswordBox passwordBox)
+ {
+ if (e.NewValue is bool boolValue)
+ {
+ if (boolValue)
+ {
+ passwordBox.PasswordChanged += PasswordChanged;
+ }
+ else
+ {
+ passwordBox.PasswordChanged -= PasswordChanged;
+ }
+ }
+ }
+ }
+
+ public static void SetIsMonitoring(DependencyObject element, bool value) => element.SetValue(IsMonitoringProperty, value);
+
+ public static bool GetIsMonitoring(DependencyObject element) => (bool)element.GetValue(IsMonitoringProperty);
+
+ private static void PasswordChanged(object sender, RoutedEventArgs e)
+ {
+ if (sender is PasswordBox passwordBox)
+ {
+ SetPasswordLength(passwordBox, passwordBox.Password.Length);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/HandyControl/Controls/CirclePanel.cs b/HandyControl/Controls/CirclePanel.cs
index ad766636..c90fb7ae 100644
--- a/HandyControl/Controls/CirclePanel.cs
+++ b/HandyControl/Controls/CirclePanel.cs
@@ -8,7 +8,7 @@ namespace HandyControl.Controls
public class CirclePanel : Panel
{
public static readonly DependencyProperty DiameterProperty = DependencyProperty.Register(
- "Diameter", typeof(double), typeof(CirclePanel), new PropertyMetadata(170.0));
+ "Diameter", typeof(double), typeof(CirclePanel), new FrameworkPropertyMetadata(170.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
public double Diameter
{
@@ -17,7 +17,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty KeepVerticalProperty = DependencyProperty.Register(
- "KeepVertical", typeof(bool), typeof(CirclePanel), new PropertyMetadata(default(bool)));
+ "KeepVertical", typeof(bool), typeof(CirclePanel), new FrameworkPropertyMetadata(default(bool), FrameworkPropertyMetadataOptions.AffectsMeasure));
public bool KeepVertical
{
@@ -26,7 +26,7 @@ namespace HandyControl.Controls
}
public static readonly DependencyProperty OffsetAngleProperty = DependencyProperty.Register(
- "OffsetAngle", typeof(double), typeof(CirclePanel), new PropertyMetadata(default(double)));
+ "OffsetAngle", typeof(double), typeof(CirclePanel), new FrameworkPropertyMetadata(default(double), FrameworkPropertyMetadataOptions.AffectsMeasure));
public double OffsetAngle
{
diff --git a/HandyControl/HandyControl.csproj b/HandyControl/HandyControl.csproj
index 90ef9689..34c77692 100644
--- a/HandyControl/HandyControl.csproj
+++ b/HandyControl/HandyControl.csproj
@@ -38,6 +38,7 @@
+
@@ -250,6 +251,14 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -262,6 +271,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -282,6 +295,10 @@
MSBuild:Compile
Designer
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -294,6 +311,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -314,6 +335,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -342,6 +367,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -374,6 +403,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/HandyControl/Properties/AssemblyInfo.cs b/HandyControl/Properties/AssemblyInfo.cs
index 6b71d2a0..21296cda 100644
--- a/HandyControl/Properties/AssemblyInfo.cs
+++ b/HandyControl/Properties/AssemblyInfo.cs
@@ -10,5 +10,5 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
+[assembly: AssemblyVersion("1.3.1.0")]
+[assembly: AssemblyFileVersion("1.3.1.0")]
diff --git a/HandyControl/Themes/Basic/Converters.xaml b/HandyControl/Themes/Basic/Converters.xaml
index 4cf30a0a..a4ae0c09 100644
--- a/HandyControl/Themes/Basic/Converters.xaml
+++ b/HandyControl/Themes/Basic/Converters.xaml
@@ -11,7 +11,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Base/ButtonBaseStyle.xaml b/HandyControl/Themes/Styles/Base/ButtonBaseStyle.xaml
index 3a6e62c8..e78fcba5 100644
--- a/HandyControl/Themes/Styles/Base/ButtonBaseStyle.xaml
+++ b/HandyControl/Themes/Styles/Base/ButtonBaseStyle.xaml
@@ -14,7 +14,7 @@
-
+
@@ -48,7 +48,7 @@
-
+
diff --git a/HandyControl/Themes/Styles/Base/ComboBoxBaseStyle.xaml b/HandyControl/Themes/Styles/Base/ComboBoxBaseStyle.xaml
new file mode 100644
index 00000000..fe644631
--- /dev/null
+++ b/HandyControl/Themes/Styles/Base/ComboBoxBaseStyle.xaml
@@ -0,0 +1,538 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Base/DatePickerBaseStyle.xaml b/HandyControl/Themes/Styles/Base/DatePickerBaseStyle.xaml
new file mode 100644
index 00000000..81d8072e
--- /dev/null
+++ b/HandyControl/Themes/Styles/Base/DatePickerBaseStyle.xaml
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Base/PasswordBoxBaseStyle.xaml b/HandyControl/Themes/Styles/Base/PasswordBoxBaseStyle.xaml
new file mode 100644
index 00000000..79198f07
--- /dev/null
+++ b/HandyControl/Themes/Styles/Base/PasswordBoxBaseStyle.xaml
@@ -0,0 +1,44 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Base/ScrollViewerBaseStyle.xaml b/HandyControl/Themes/Styles/Base/ScrollViewerBaseStyle.xaml
index 198893b8..6134dd61 100644
--- a/HandyControl/Themes/Styles/Base/ScrollViewerBaseStyle.xaml
+++ b/HandyControl/Themes/Styles/Base/ScrollViewerBaseStyle.xaml
@@ -35,6 +35,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -157,6 +200,12 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Base/TimePickerBaseStyle.xaml b/HandyControl/Themes/Styles/Base/TimePickerBaseStyle.xaml
new file mode 100644
index 00000000..4d25ca7f
--- /dev/null
+++ b/HandyControl/Themes/Styles/Base/TimePickerBaseStyle.xaml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Base/ToggleButtonBaseStyle.xaml b/HandyControl/Themes/Styles/Base/ToggleButtonBaseStyle.xaml
index 41d2f9f1..a421b331 100644
--- a/HandyControl/Themes/Styles/Base/ToggleButtonBaseStyle.xaml
+++ b/HandyControl/Themes/Styles/Base/ToggleButtonBaseStyle.xaml
@@ -54,7 +54,7 @@
-
+
@@ -189,7 +189,7 @@
-
+
@@ -236,7 +236,7 @@
-
+
diff --git a/HandyControl/Themes/Styles/Button.xaml b/HandyControl/Themes/Styles/Button.xaml
index 618afb97..a0a3b426 100644
--- a/HandyControl/Themes/Styles/Button.xaml
+++ b/HandyControl/Themes/Styles/Button.xaml
@@ -84,7 +84,7 @@
-
+
diff --git a/HandyControl/Themes/Styles/Clock.xaml b/HandyControl/Themes/Styles/Clock.xaml
index d1afc42f..2503b846 100644
--- a/HandyControl/Themes/Styles/Clock.xaml
+++ b/HandyControl/Themes/Styles/Clock.xaml
@@ -59,6 +59,7 @@
-
-
-
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Pagination.xaml b/HandyControl/Themes/Styles/Pagination.xaml
index 97ef3fb4..bac957ec 100644
--- a/HandyControl/Themes/Styles/Pagination.xaml
+++ b/HandyControl/Themes/Styles/Pagination.xaml
@@ -43,7 +43,7 @@
-
+
diff --git a/HandyControl/Themes/Styles/PasswordBox.xaml b/HandyControl/Themes/Styles/PasswordBox.xaml
new file mode 100644
index 00000000..b0406953
--- /dev/null
+++ b/HandyControl/Themes/Styles/PasswordBox.xaml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/ScrollViewer.xaml b/HandyControl/Themes/Styles/ScrollViewer.xaml
index 2a577eef..b36f36b1 100644
--- a/HandyControl/Themes/Styles/ScrollViewer.xaml
+++ b/HandyControl/Themes/Styles/ScrollViewer.xaml
@@ -6,7 +6,9 @@
-
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Style.xaml b/HandyControl/Themes/Styles/Style.xaml
index 4813232c..46349e53 100644
--- a/HandyControl/Themes/Styles/Style.xaml
+++ b/HandyControl/Themes/Styles/Style.xaml
@@ -5,29 +5,22 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/HandyControl/Themes/Styles/TextBox.xaml b/HandyControl/Themes/Styles/TextBox.xaml
index 257b5c73..12a6cfa2 100644
--- a/HandyControl/Themes/Styles/TextBox.xaml
+++ b/HandyControl/Themes/Styles/TextBox.xaml
@@ -1,30 +1,83 @@
+ xmlns:controls="clr-namespace:HandyControl.Controls"
+ xmlns:system="clr-namespace:System;assembly=mscorlib">
+
+
-
-
-
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/TimePicker.xaml b/HandyControl/Themes/Styles/TimePicker.xaml
index de3b6437..70693ca3 100644
--- a/HandyControl/Themes/Styles/TimePicker.xaml
+++ b/HandyControl/Themes/Styles/TimePicker.xaml
@@ -1,41 +1,129 @@
+ xmlns:controls="clr-namespace:HandyControl.Controls"
+ xmlns:system="clr-namespace:System;assembly=mscorlib">
-
-
+
+
+
-
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/ToggleButton.xaml b/HandyControl/Themes/Styles/ToggleButton.xaml
index a54b0c56..0be61753 100644
--- a/HandyControl/Themes/Styles/ToggleButton.xaml
+++ b/HandyControl/Themes/Styles/ToggleButton.xaml
@@ -139,7 +139,7 @@
-
+
diff --git a/HandyControl/Themes/Styles/ToolTip.xaml b/HandyControl/Themes/Styles/ToolTip.xaml
new file mode 100644
index 00000000..83bb6b33
--- /dev/null
+++ b/HandyControl/Themes/Styles/ToolTip.xaml
@@ -0,0 +1,22 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControlDemo/Data/MessageToken.cs b/HandyControlDemo/Data/MessageToken.cs
index 0d3b673a..fccdd53b 100644
--- a/HandyControlDemo/Data/MessageToken.cs
+++ b/HandyControlDemo/Data/MessageToken.cs
@@ -26,6 +26,8 @@
public static readonly string TimePickerDemoCtl = nameof(TimePickerDemoCtl);
+ public static readonly string CirclePanelDemoCtl = nameof(CirclePanelDemoCtl);
+
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
@@ -40,6 +42,14 @@
public static readonly string DatePickerDemoCtl = nameof(DatePickerDemoCtl);
+ public static readonly string TextBoxDemoCtl = nameof(TextBoxDemoCtl);
+
+ public static readonly string TextBlockDemoCtl = nameof(TextBlockDemoCtl);
+
+ public static readonly string ComboBoxDemoCtl = nameof(ComboBoxDemoCtl);
+
+ public static readonly string PasswordBoxDemoCtl = nameof(PasswordBoxDemoCtl);
+
public static readonly string LoadShowContent = nameof(LoadShowContent);
}
}
\ No newline at end of file
diff --git a/HandyControlDemo/Data/MessageToken.tt b/HandyControlDemo/Data/MessageToken.tt
index 68956cc5..8e549b16 100644
--- a/HandyControlDemo/Data/MessageToken.tt
+++ b/HandyControlDemo/Data/MessageToken.tt
@@ -15,7 +15,8 @@ var controlList = new List
"AnimationPathDemoCtl",
"StepBarDemoCtl",
"ClockDemoCtl",
- "TimePickerDemoCtl"
+ "TimePickerDemoCtl",
+ "CirclePanelDemoCtl"
};
var styleList = new List
{
@@ -25,7 +26,11 @@ var styleList = new List
"ProgressBarDemoCtl",
"TabControlDemoCtl",
"CalendarDemoCtl",
- "DatePickerDemoCtl"
+ "DatePickerDemoCtl",
+ "TextBoxDemoCtl",
+ "TextBlockDemoCtl",
+ "ComboBoxDemoCtl",
+ "PasswordBoxDemoCtl"
};
#>
namespace HandyControlDemo.Data
diff --git a/HandyControlDemo/HandyControlDemo.csproj b/HandyControlDemo/HandyControlDemo.csproj
index bf29c945..1592ca85 100644
--- a/HandyControlDemo/HandyControlDemo.csproj
+++ b/HandyControlDemo/HandyControlDemo.csproj
@@ -78,12 +78,16 @@
Lang.en.resx
+
AnimationPathDemoCtl.xaml
CarouselDemoCtl.xaml
+
+ CirclePanelDemoCtl.xaml
+
ClockDemoCtl.xaml
@@ -117,6 +121,9 @@
CalendarDemoCtl.xaml
+
+ ComboBoxDemoCtl.xaml
+
DatePickerDemoCtl.xaml
@@ -135,15 +142,25 @@
TimeBarDemoCtl.xaml
+
+ PasswordBoxDemoCtl.xaml
+
ProgressBarDemoCtl.xaml
TabControlDemoCtl.xaml
+
+ TextBlockDemoCtl.xaml
+
+
+ TextBoxDemoCtl.xaml
+
ToggleButtonDemoCtl.xaml
+
@@ -168,10 +185,18 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -192,6 +217,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -236,6 +265,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -260,6 +293,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -268,6 +305,14 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/HandyControlDemo/Properties/AssemblyInfo.cs b/HandyControlDemo/Properties/AssemblyInfo.cs
index c4043395..6bb913ac 100644
--- a/HandyControlDemo/Properties/AssemblyInfo.cs
+++ b/HandyControlDemo/Properties/AssemblyInfo.cs
@@ -12,5 +12,5 @@ using System.Windows;
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
-[assembly: AssemblyVersion("1.3.0.0")]
-[assembly: AssemblyFileVersion("1.3.0.0")]
+[assembly: AssemblyVersion("1.3.1.0")]
+[assembly: AssemblyFileVersion("1.3.1.0")]
diff --git a/HandyControlDemo/Properties/Langs/Lang.Designer.cs b/HandyControlDemo/Properties/Langs/Lang.Designer.cs
index ed5b1271..91f27645 100644
--- a/HandyControlDemo/Properties/Langs/Lang.Designer.cs
+++ b/HandyControlDemo/Properties/Langs/Lang.Designer.cs
@@ -123,6 +123,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
+ ///
+ /// 查找类似 圆形布局 的本地化字符串。
+ ///
+ public static string CirclePanel {
+ get {
+ return ResourceManager.GetString("CirclePanel", resourceCulture);
+ }
+ }
+
///
/// 查找类似 时钟 的本地化字符串。
///
@@ -141,6 +150,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
+ ///
+ /// 查找类似 组合框 的本地化字符串。
+ ///
+ public static string ComboBox {
+ get {
+ return ResourceManager.GetString("ComboBox", resourceCulture);
+ }
+ }
+
///
/// 查找类似 对比滑块 的本地化字符串。
///
@@ -159,6 +177,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
+ ///
+ /// 查找类似 这是内容 的本地化字符串。
+ ///
+ public static string ContentDemoStr {
+ get {
+ return ResourceManager.GetString("ContentDemoStr", resourceCulture);
+ }
+ }
+
///
/// 查找类似 控件 的本地化字符串。
///
@@ -321,6 +348,24 @@ namespace HandyControlDemo.Properties.Langs {
}
}
+ ///
+ /// 查找类似 密码框 的本地化字符串。
+ ///
+ public static string PasswordBox {
+ get {
+ return ResourceManager.GetString("PasswordBox", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 请输入内容 的本地化字符串。
+ ///
+ public static string PlsEnterContent {
+ get {
+ return ResourceManager.GetString("PlsEnterContent", resourceCulture);
+ }
+ }
+
///
/// 查找类似 上一步 的本地化字符串。
///
@@ -375,6 +420,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
+ ///
+ /// 查找类似 子标题 的本地化字符串。
+ ///
+ public static string SubTitle {
+ get {
+ return ResourceManager.GetString("SubTitle", resourceCulture);
+ }
+ }
+
///
/// 查找类似 成功 的本地化字符串。
///
@@ -393,6 +447,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
+ ///
+ /// 查找类似 正文 的本地化字符串。
+ ///
+ public static string Text {
+ get {
+ return ResourceManager.GetString("Text", resourceCulture);
+ }
+ }
+
///
/// 查找类似 文本块 的本地化字符串。
///
@@ -402,6 +465,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
+ ///
+ /// 查找类似 文本框 的本地化字符串。
+ ///
+ public static string TextBox {
+ get {
+ return ResourceManager.GetString("TextBox", resourceCulture);
+ }
+ }
+
///
/// 查找类似 时间条 的本地化字符串。
///
@@ -429,6 +501,33 @@ namespace HandyControlDemo.Properties.Langs {
}
}
+ ///
+ /// 查找类似 这是标题 的本地化字符串。
+ ///
+ public static string TitleDemoStr1 {
+ get {
+ return ResourceManager.GetString("TitleDemoStr1", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 此项必填 的本地化字符串。
+ ///
+ public static string TitleDemoStr2 {
+ get {
+ return ResourceManager.GetString("TitleDemoStr2", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 标题在左侧 的本地化字符串。
+ ///
+ public static string TitleDemoStr3 {
+ get {
+ return ResourceManager.GetString("TitleDemoStr3", resourceCulture);
+ }
+ }
+
///
/// 查找类似 切换按钮 的本地化字符串。
///
diff --git a/HandyControlDemo/Properties/Langs/Lang.en.resx b/HandyControlDemo/Properties/Langs/Lang.en.resx
index 5573ee87..741cf0ce 100644
--- a/HandyControlDemo/Properties/Langs/Lang.en.resx
+++ b/HandyControlDemo/Properties/Langs/Lang.en.resx
@@ -249,4 +249,37 @@
TimePicker
+
+ TextBox
+
+
+ This is the content
+
+
+ This is the title
+
+
+ This item must be filled in
+
+
+ Please enter content
+
+
+ The title is on the left
+
+
+ Text
+
+
+ Subtitle
+
+
+ PasswordBox
+
+
+ CirclePanel
+
+
+ ComboBox
+
\ No newline at end of file
diff --git a/HandyControlDemo/Properties/Langs/Lang.resx b/HandyControlDemo/Properties/Langs/Lang.resx
index 29574bbd..b5a6042d 100644
--- a/HandyControlDemo/Properties/Langs/Lang.resx
+++ b/HandyControlDemo/Properties/Langs/Lang.resx
@@ -229,4 +229,37 @@
时间选择器
+
+ 文本框
+
+
+ 这是内容
+
+
+ 这是标题
+
+
+ 此项必填
+
+
+ 请输入内容
+
+
+ 标题在左侧
+
+
+ 正文
+
+
+ 子标题
+
+
+ 密码框
+
+
+ 圆形布局
+
+
+ 组合框
+
\ No newline at end of file
diff --git a/HandyControlDemo/Resources/Themes/Basic/Converters.xaml b/HandyControlDemo/Resources/Themes/Basic/Converters.xaml
new file mode 100644
index 00000000..f979cb7f
--- /dev/null
+++ b/HandyControlDemo/Resources/Themes/Basic/Converters.xaml
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControlDemo/Resources/Themes/Basic/Geometries.xaml b/HandyControlDemo/Resources/Themes/Basic/Geometries.xaml
index 30fb4ba4..265bebc3 100644
--- a/HandyControlDemo/Resources/Themes/Basic/Geometries.xaml
+++ b/HandyControlDemo/Resources/Themes/Basic/Geometries.xaml
@@ -3,5 +3,7 @@
M512 0h1216a512 512 0 1 1 0 1024H512A512 512 0 1 1 512 0zM420.16 311.04V768h74.88V433.92h2.56l228.48 334.08h72.96V311.04h-75.52v329.6h-2.56l-225.92-329.6h-74.88z m468.48 0V768h340.48v-64h-265.6V565.76h239.36v-64h-239.36V375.04h254.72v-64h-329.6z m369.28 0l131.2 456.96h80l89.6-343.68h2.56l88.96 343.68h79.36l131.84-456.96h-84.48l-85.76 347.52h-2.56l-90.24-347.52h-77.44l-90.24 347.52h-2.56l-85.76-347.52h-84.48z
M40.493382,19.001303 C36.637875,19.06448 33.938568,21.421986 33.948524,25.271919 L34.068279,71.56765 34.066906,71.598007 34.068745,71.747833 34.18895,118.21758 C34.202225,123.35083 39.026951,129.19344 44.965271,131.2674 50.903587,133.34137 55.706783,130.86133 55.693504,125.72808 L55.589508,85.524513 93.866371,85.524513 93.950943,118.21758 C93.964218,123.35083 98.788948,129.19344 104.72726,131.2674 110.66558,133.34137 115.46878,130.86133 115.4555,125.72808 L115.33575,79.432381 115.33712,79.401993 115.33528,79.252007 115.21507,32.782413 C115.2018,27.64917 110.37708,21.806566 104.43876,19.732603 98.500435,17.658638 93.697243,20.138674 93.710518,25.271919 L93.814514,65.475487 55.537647,65.475487 55.453079,32.782413 C55.439804,27.64917 50.615082,21.806566 44.676762,19.732603 43.192181,19.214111 41.778549,18.980244 40.493382,19.001303 z M9.999999,0 L140,0 C145.52284,0 150,4.4771523 150,9.999999 L150,140 C150,145.52284 145.52284,150 140,150 L9.999999,150 C4.4771523,150 0,145.52284 0,140 L0,9.999999 C0,4.4771523 4.4771523,0 9.999999,0 z
+ M28.677037,-2.2499313E-22 C38.75065,24.740243 38.50705,52.437974 27.999852,77.000001 L-1.7053028E-13,65.206651 C7.3550318,48.013234 7.5255431,28.624822 0.4740567,11.306663 z
+ M267.287478 892.162257c0 45.149912 59.597884 71.336861 93.008818 37.925926L740.458554 549.925926c21.671958-21.671958 21.671958-54.179894 0-75.851852L360.296296 93.911817c-33.410935-33.410935-93.008818-5.417989-93.008818 38.828924v759.421516z m0 0
\ No newline at end of file
diff --git a/HandyControlDemo/Resources/Themes/Styles/Button.xaml b/HandyControlDemo/Resources/Themes/Styles/Button.xaml
new file mode 100644
index 00000000..076d5b4c
--- /dev/null
+++ b/HandyControlDemo/Resources/Themes/Styles/Button.xaml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControlDemo/Resources/Themes/Styles/Style.xaml b/HandyControlDemo/Resources/Themes/Styles/Style.xaml
index c187fff7..6d965fde 100644
--- a/HandyControlDemo/Resources/Themes/Styles/Style.xaml
+++ b/HandyControlDemo/Resources/Themes/Styles/Style.xaml
@@ -3,8 +3,10 @@
+
+
\ No newline at end of file
diff --git a/HandyControlDemo/Tools/Converter/StringRepeatConverter.cs b/HandyControlDemo/Tools/Converter/StringRepeatConverter.cs
new file mode 100644
index 00000000..ab297231
--- /dev/null
+++ b/HandyControlDemo/Tools/Converter/StringRepeatConverter.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Globalization;
+using System.Text;
+using System.Windows.Data;
+
+namespace HandyControlDemo.Tools.Converter
+{
+ public class StringRepeatConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is string strValue)
+ {
+ var builder = new StringBuilder();
+ int num;
+ if (parameter is string numStr)
+ {
+ if (!int.TryParse(numStr, out num))
+ {
+ return strValue;
+ }
+ }
+ else if(parameter is int intValue)
+ {
+ num = intValue;
+ }
+ else
+ {
+ return strValue;
+ }
+ for (var i = 0; i < num; i++)
+ {
+ builder.Append(strValue);
+ }
+ return builder.ToString();
+ }
+ return string.Empty;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
diff --git a/HandyControlDemo/UserControl/Controls/CirclePanelDemoCtl.xaml b/HandyControlDemo/UserControl/Controls/CirclePanelDemoCtl.xaml
new file mode 100644
index 00000000..4b9b84c5
--- /dev/null
+++ b/HandyControlDemo/UserControl/Controls/CirclePanelDemoCtl.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Controls/CirclePanelDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/CirclePanelDemoCtl.xaml.cs
new file mode 100644
index 00000000..62bee1d5
--- /dev/null
+++ b/HandyControlDemo/UserControl/Controls/CirclePanelDemoCtl.xaml.cs
@@ -0,0 +1,10 @@
+namespace HandyControlDemo.UserControl
+{
+ public partial class CirclePanelDemoCtl
+ {
+ public CirclePanelDemoCtl()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/HandyControlDemo/UserControl/Controls/TimePickerDemoCtl.xaml b/HandyControlDemo/UserControl/Controls/TimePickerDemoCtl.xaml
index 744f34e2..44f8eef8 100644
--- a/HandyControlDemo/UserControl/Controls/TimePickerDemoCtl.xaml
+++ b/HandyControlDemo/UserControl/Controls/TimePickerDemoCtl.xaml
@@ -2,8 +2,19 @@
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="White">
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
index 2ba15aef..a1162c0e 100644
--- a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
+++ b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
@@ -16,13 +16,18 @@
+
+
+
+
-
+
-
+
+
diff --git a/HandyControlDemo/UserControl/Styles/CalendarDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Styles/CalendarDemoCtl.xaml.cs
index bc182eb8..9c4fdb7e 100644
--- a/HandyControlDemo/UserControl/Styles/CalendarDemoCtl.xaml.cs
+++ b/HandyControlDemo/UserControl/Styles/CalendarDemoCtl.xaml.cs
@@ -1,9 +1,6 @@
// ReSharper disable once CheckNamespace
namespace HandyControlDemo.UserControl
{
- ///
- /// CalendarDemoCtl.xaml 的交互逻辑
- ///
public partial class CalendarDemoCtl
{
public CalendarDemoCtl()
diff --git a/HandyControlDemo/UserControl/Styles/ComboBoxDemoCtl.xaml b/HandyControlDemo/UserControl/Styles/ComboBoxDemoCtl.xaml
new file mode 100644
index 00000000..752b0eca
--- /dev/null
+++ b/HandyControlDemo/UserControl/Styles/ComboBoxDemoCtl.xaml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Styles/ComboBoxDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Styles/ComboBoxDemoCtl.xaml.cs
new file mode 100644
index 00000000..7ed05820
--- /dev/null
+++ b/HandyControlDemo/UserControl/Styles/ComboBoxDemoCtl.xaml.cs
@@ -0,0 +1,11 @@
+// ReSharper disable once CheckNamespace
+namespace HandyControlDemo.UserControl
+{
+ public partial class ComboBoxDemoCtl
+ {
+ public ComboBoxDemoCtl()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/HandyControlDemo/UserControl/Styles/DatePickerDemoCtl.xaml b/HandyControlDemo/UserControl/Styles/DatePickerDemoCtl.xaml
index 6b9a97c1..f3f72689 100644
--- a/HandyControlDemo/UserControl/Styles/DatePickerDemoCtl.xaml
+++ b/HandyControlDemo/UserControl/Styles/DatePickerDemoCtl.xaml
@@ -3,8 +3,19 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
xmlns:system="clr-namespace:System;assembly=mscorlib"
+ xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
Background="White">
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Styles/PasswordBoxDemoCtl.xaml b/HandyControlDemo/UserControl/Styles/PasswordBoxDemoCtl.xaml
new file mode 100644
index 00000000..3b1141cc
--- /dev/null
+++ b/HandyControlDemo/UserControl/Styles/PasswordBoxDemoCtl.xaml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Styles/PasswordBoxDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Styles/PasswordBoxDemoCtl.xaml.cs
new file mode 100644
index 00000000..3b7fc40f
--- /dev/null
+++ b/HandyControlDemo/UserControl/Styles/PasswordBoxDemoCtl.xaml.cs
@@ -0,0 +1,11 @@
+// ReSharper disable once CheckNamespace
+namespace HandyControlDemo.UserControl
+{
+ public partial class PasswordBoxDemoCtl
+ {
+ public PasswordBoxDemoCtl()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/HandyControlDemo/UserControl/Styles/TextBlockDemoCtl.xaml b/HandyControlDemo/UserControl/Styles/TextBlockDemoCtl.xaml
new file mode 100644
index 00000000..63003fd7
--- /dev/null
+++ b/HandyControlDemo/UserControl/Styles/TextBlockDemoCtl.xaml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Styles/TextBlockDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Styles/TextBlockDemoCtl.xaml.cs
new file mode 100644
index 00000000..3bffb2c6
--- /dev/null
+++ b/HandyControlDemo/UserControl/Styles/TextBlockDemoCtl.xaml.cs
@@ -0,0 +1,14 @@
+// ReSharper disable once CheckNamespace
+namespace HandyControlDemo.UserControl
+{
+ ///
+ /// TextBlockDemoCtl.xaml 的交互逻辑
+ ///
+ public partial class TextBlockDemoCtl
+ {
+ public TextBlockDemoCtl()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/HandyControlDemo/UserControl/Styles/TextBoxDemoCtl.xaml b/HandyControlDemo/UserControl/Styles/TextBoxDemoCtl.xaml
new file mode 100644
index 00000000..3146f81a
--- /dev/null
+++ b/HandyControlDemo/UserControl/Styles/TextBoxDemoCtl.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Styles/TextBoxDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Styles/TextBoxDemoCtl.xaml.cs
new file mode 100644
index 00000000..dec61bbe
--- /dev/null
+++ b/HandyControlDemo/UserControl/Styles/TextBoxDemoCtl.xaml.cs
@@ -0,0 +1,14 @@
+// ReSharper disable once CheckNamespace
+namespace HandyControlDemo.UserControl
+{
+ ///
+ /// TextBoxDemoCtl.xaml 的交互逻辑
+ ///
+ public partial class TextBoxDemoCtl
+ {
+ public TextBoxDemoCtl()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/HandyControlDemo/ViewModel/ComboBoxDemoViewModel.cs b/HandyControlDemo/ViewModel/ComboBoxDemoViewModel.cs
new file mode 100644
index 00000000..c83e6e07
--- /dev/null
+++ b/HandyControlDemo/ViewModel/ComboBoxDemoViewModel.cs
@@ -0,0 +1,36 @@
+using System.Collections.Generic;
+using System.Globalization;
+using GalaSoft.MvvmLight;
+using HandyControlDemo.Tools.Converter;
+
+namespace HandyControlDemo.ViewModel
+{
+ public class ComboBoxDemoViewModel : ViewModelBase
+ {
+ ///
+ /// 数据列表
+ ///
+ private List _dataList;
+
+ ///
+ /// 数据列表
+ ///
+ public List DataList
+ {
+ get => _dataList;
+ set => Set(ref _dataList, value);
+ }
+
+ public ComboBoxDemoViewModel()
+ {
+ var converter = new StringRepeatConverter();
+ var list = new List();
+ for (var i = 1; i <= 9; i++)
+ {
+ list.Add(converter.Convert(Properties.Langs.Lang.Text, null, i, CultureInfo.CurrentCulture)?.ToString());
+ }
+
+ DataList = list;
+ }
+ }
+}
\ No newline at end of file
diff --git a/HandyControlDemo/ViewModel/ViewModelLocator.cs b/HandyControlDemo/ViewModel/ViewModelLocator.cs
index b20e9a1c..3874d3d1 100644
--- a/HandyControlDemo/ViewModel/ViewModelLocator.cs
+++ b/HandyControlDemo/ViewModel/ViewModelLocator.cs
@@ -14,6 +14,7 @@ namespace HandyControlDemo.ViewModel
SimpleIoc.Default.Register();
SimpleIoc.Default.Register();
SimpleIoc.Default.Register();
+ SimpleIoc.Default.Register();
}
public static ViewModelLocator Instance => new Lazy(() =>
@@ -27,6 +28,8 @@ namespace HandyControlDemo.ViewModel
public ImageBrowserDemoViewModel ImageBrowserDemo => ServiceLocator.Current.GetInstance();
+ public ComboBoxDemoViewModel ComboBoxDemo => ServiceLocator.Current.GetInstance();
+
#endregion
}
}
\ No newline at end of file
diff --git a/README.md b/README.md
index 4cd3771c..0ba4a9ab 100644
--- a/README.md
+++ b/README.md
@@ -2,80 +2,105 @@
  [](https://www.nuget.org/packages/HandyControl) [](https://ci.appveyor.com/project/NaBian/handycontrol) [](https://gitter.im/HandyControl/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-# 欢迎使用 HandyControl
+# Welcome to HandyControl
-> HandyControl包含了我在开发过程中觉得wpf原生库中所欠缺的东西,现在所有的控件均已编码完毕,我会抽空将最为常用的部分一一开源,因个人能力和时间精力的原因,控件库中难免会留有bug,如果你发现了它们请给我提issue,谢谢。
+## Latest examples
-让我们开门见山,HandyControl已经开源的控件截图有:
+### 1、TextBlock
-## 最新控件
-### 1、日历Calendar
+
-
+### 2、TextBox
-### 2、时钟Clock
+
-
+### 3、ComboBox
-## 历史发布
-### 1、颜色拾取器ColorPicker
+
-
+### 4、PasswordBox
-### 2、加载条Loading
+
-
+### 5、DataPicker
-### 3、轮播Carousel
+
-
+### 6、TimePicker
-### 4、页码条Pagination
+
-
+### 7、CirclePanel
-### 5、展开折叠框Expander
+
-
+## History publication
+### 1、ColorPicker
-### 6、时间条TimeBar
+
-
+### 2、Loading
-### 7、图片浏览器ImageBrowser
+
-
+### 3、Carousel
-### 8、对比滑块CompareSlider
+
-
+### 4、Pagination
-
+
-### 9、信息通知Growl
+### 5、Expander
-
+
-### 10、动画路径AnimationPath
+### 6、TimeBar
-
+
-### 11、进度条ProgressBar
+### 7、ImageBrowser
-
+
-### 12、选项卡控件TabControl
+### 8、CompareSlider
-
+
-### 13、步骤条StepBar
+
-
+### 9、Growl
-# 使用方法
+
-第一步:添加HandyControl的引用;
-第二步:在App.xaml中按照以下方式添加代码:
+### 10、AnimationPath
+
+
+
+### 11、ProgressBar
+
+
+
+### 12、TabControl
+
+
+
+### 13、StepBar
+
+
+
+### 14、Calendar
+
+
+
+### 15、Clock
+
+
+
+# Usage
+
+Step 1:Add a reference to HandyControl or search for HandyControl on the nuget;
+Step 2:Add code in App.xaml as follows:
```XML
@@ -85,30 +110,24 @@
```
-第三步:enjoy coding
+Step 3:enjoy coding
# FAQ
-* 如何让**Scrollviewer**具有惯性?只要:
+* How to make **Scrollviewer** inertial?
```XML
-
+
```
-* 如何让**Scrollviewer**具有穿透效果?只要:
+* How to make **Scrollviewer** Penetrating?
```XML
-
+
```
-* 为什么我连编译都无法通过:
-编译之前,请确保IDE为vs2017且c#最低版本为7.0,HandyControl目前仅支持4.5以上的.net环境。
-
# v1.4.0 Plan
-- add ComboBox Style;
-- add TextBox Style;
-- add PasswordBox Style;
-- add TabControl Style;
-- add Black Theme
\ No newline at end of file
+- add TabControl Style
+- add Dark Theme
\ No newline at end of file
diff --git a/Resources/CirclePanel.jpg b/Resources/CirclePanel.jpg
new file mode 100644
index 00000000..d8e8a261
Binary files /dev/null and b/Resources/CirclePanel.jpg differ
diff --git a/Resources/ComboBox.jpg b/Resources/ComboBox.jpg
new file mode 100644
index 00000000..3e8b72db
Binary files /dev/null and b/Resources/ComboBox.jpg differ
diff --git a/Resources/DataPicker.jpg b/Resources/DataPicker.jpg
new file mode 100644
index 00000000..864385a0
Binary files /dev/null and b/Resources/DataPicker.jpg differ
diff --git a/Resources/PasswordBox.jpg b/Resources/PasswordBox.jpg
new file mode 100644
index 00000000..4c428068
Binary files /dev/null and b/Resources/PasswordBox.jpg differ
diff --git a/Resources/TextBlock.jpg b/Resources/TextBlock.jpg
new file mode 100644
index 00000000..308fca9c
Binary files /dev/null and b/Resources/TextBlock.jpg differ
diff --git a/Resources/TextBox.jpg b/Resources/TextBox.jpg
new file mode 100644
index 00000000..911925c9
Binary files /dev/null and b/Resources/TextBox.jpg differ
diff --git a/Resources/TimePicker.jpg b/Resources/TimePicker.jpg
new file mode 100644
index 00000000..e40f2064
Binary files /dev/null and b/Resources/TimePicker.jpg differ