From 8e707a66a92868ba63d6083e8953164f0f18f0e5 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Mon, 23 Jan 2023 22:27:50 +0800
Subject: [PATCH] enhance: optimize input elements.
---
.../Styles/Base/CheckComboBoxBaseStyle.xaml | 613 ++--
.../Themes/Styles/Base/ComboBoxBaseStyle.xaml | 1364 ++++----
.../Themes/Styles/Window.xaml | 17 +-
.../HandyControl_Net_40/Themes/Theme.xaml | 2842 +++++++----------
.../HandyControlDemo_Shared/MainWindow.xaml | 37 +-
.../Tools/Helper/VersionHelper.cs | 36 +-
.../Controls/CheckComboBoxDemoCtl.xaml | 28 +-
.../UserControl/Controls/ComboBoxDemoCtl.xaml | 32 +-
.../Controls/DatePickerDemoCtl.xaml | 12 +-
.../Controls/DateTimePickerDemoCtl.xaml | 24 +-
.../Controls/NumericUpDownDemoCtl.xaml | 64 +-
.../Controls/PasswordBoxDemoCtl.xaml | 16 +-
.../Controls/SearchBarDemoCtl.xaml | 68 +-
.../Controls/TimePickerDemoCtl.xaml | 30 +-
.../Controls/Attach/InfoElement.cs | 4 +-
.../Controls/Attach/TitleElement.cs | 9 +
.../Controls/Block/ToggleBlock.cs | 53 +-
.../Input/CheckComboBox/CheckComboBox.cs | 97 +-
.../Controls/Input/ComboBox.cs | 134 +-
.../Controls/Input/DatePicker.cs | 100 +-
.../Controls/Input/DateTimePicker.cs | 87 +-
.../Controls/Input/IDataInput.cs | 42 -
.../Controls/Input/PasswordBox.cs | 101 +-
.../Controls/Input/TimePicker.cs | 87 +-
.../HandyControl_Shared.projitems | 1 -
.../Interactivity/Commands/ControlCommands.cs | 2 +
.../Themes/Basic/Sizes.xaml | 7 +-
.../Themes/Styles/Base/BaseStyle.xaml | 49 +-
.../Styles/Base/CheckComboBoxBaseStyle.xaml | 651 ++--
.../Themes/Styles/Base/ComboBoxBaseStyle.xaml | 1654 +++++-----
.../Themes/Styles/Base/DataGridBaseStyle.xaml | 18 +-
.../Styles/Base/DatePickerBaseStyle.xaml | 250 +-
.../Styles/Base/DateTimePickerBaseStyle.xaml | 244 +-
.../Styles/Base/NumericUpDownBaseStyle.xaml | 28 +-
.../Styles/Base/PasswordBoxBaseStyle.xaml | 125 +-
.../Styles/Base/SearchBarBaseStyle.xaml | 18 +-
.../Styles/Base/TabControlBaseStyle.xaml | 8 +-
.../Themes/Styles/Base/TextBoxBaseStyle.xaml | 50 +-
.../Styles/Base/TimePickerBaseStyle.xaml | 246 +-
.../Styles/Base/ToggleButtonBaseStyle.xaml | 2 +-
.../Themes/Styles/CheckComboBox.xaml | 15 +-
.../Themes/Styles/ComboBox.xaml | 6 +-
.../Themes/Styles/DataGrid.xaml | 2 +-
.../Themes/Styles/DatePicker.xaml | 8 +-
.../Themes/Styles/DateTimePicker.xaml | 8 +-
.../Themes/Styles/NumericUpDown.xaml | 8 +-
.../Themes/Styles/PasswordBox.xaml | 8 +-
.../Themes/Styles/SearchBar.xaml | 8 +-
.../Themes/Styles/TextBox.xaml | 8 +-
.../Themes/Styles/TimePicker.xaml | 8 +-
.../HandyControl_Shared/Themes/Theme.xaml | 2822 +++++++---------
.../Converter/ThicknessSplitConverter.cs | 34 +-
52 files changed, 5095 insertions(+), 7090 deletions(-)
delete mode 100644 src/Shared/HandyControl_Shared/Controls/Input/IDataInput.cs
diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml
index 887796bc..948fd99e 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml
@@ -7,58 +7,25 @@
xmlns:langs="clr-namespace:HandyControl.Properties.Langs">
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
-
+
@@ -252,306 +213,286 @@
-
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
-
+
-
-
-
-
-
-
-
-
-
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
+
diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/ComboBoxBaseStyle.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/ComboBoxBaseStyle.xaml
index e3e6a7c5..171b3185 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/ComboBoxBaseStyle.xaml
+++ b/src/Net_40/HandyControl_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-
-
-
@@ -8484,65 +8224,53 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
@@ -8809,65 +8497,53 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
@@ -10109,16 +9767,15 @@
-
+
-
+
-
-
-
-
-
+
+
+
+
@@ -10133,33 +9790,16 @@
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
@@ -10171,12 +9811,11 @@
-
-
-
-
-
+
+
+
+
@@ -10191,40 +9830,20 @@
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
@@ -11554,65 +11133,53 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
+
@@ -13310,14 +12894,15 @@
@@ -13325,7 +12910,8 @@
-
+
+
@@ -14106,15 +13696,19 @@
diff --git a/src/Shared/HandyControlDemo_Shared/MainWindow.xaml b/src/Shared/HandyControlDemo_Shared/MainWindow.xaml
index 0f0decce..e7e26f91 100644
--- a/src/Shared/HandyControlDemo_Shared/MainWindow.xaml
+++ b/src/Shared/HandyControlDemo_Shared/MainWindow.xaml
@@ -1,20 +1,19 @@
-
+
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs b/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs
index 955fba11..d6cde51b 100644
--- a/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs
+++ b/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs
@@ -9,41 +9,41 @@ internal class VersionHelper
{
var versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location);
#if NET40
- var netVersion = "NET 40";
+ var netVersion = ".NET Framework 4.0";
#elif NET45
- var netVersion = "NET 45";
+ var netVersion = ".NET Framework 4.5";
#elif NET451
- var netVersion = "NET 451";
+ var netVersion = ".NET Framework 4.5.1";
#elif NET452
- var netVersion = "NET 452";
+ var netVersion = ".NET Framework 4.5.2";
#elif NET46
- var netVersion = "NET 46";
+ var netVersion = ".NET Framework 4.6";
#elif NET461
- var netVersion = "NET 461";
+ var netVersion = ".NET Framework 4.6.1";
#elif NET462
- var netVersion = "NET 462";
+ var netVersion = ".NET Framework 4.6.2";
#elif NET47
- var netVersion = "NET 47";
+ var netVersion = ".NET Framework 4.7";
#elif NET471
- var netVersion = "NET 471";
+ var netVersion = ".NET Framework 4.7.1";
#elif NET472
- var netVersion = "NET 472";
+ var netVersion = ".NET Framework 4.7.2";
#elif NET48
- var netVersion = "NET 48";
+ var netVersion = ".NET Framework 4.8";
#elif NET481
- var netVersion = "NET 481";
+ var netVersion = ".NET Framework 4.8.1";
#elif NET5_0
- var netVersion = "NET 50";
+ var netVersion = ".NET 5.0";
#elif NET6_0
- var netVersion = "NET 60";
+ var netVersion = ".NET 6.0";
#elif NET7_0
- var netVersion = "NET 70";
+ var netVersion = ".NET 7.0";
#elif NETCOREAPP3_0
- var netVersion = "CORE 30";
+ var netVersion = ".NET CORE 3.0";
#elif NETCOREAPP3_1
- var netVersion = "CORE 31";
+ var netVersion = ".NET CORE 3.1";
#endif
- return $"v {versionInfo.FileVersion} {netVersion}";
+ return $"v{versionInfo.FileVersion} {netVersion}";
}
internal static string GetCopyright() =>
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml
index 79e3ea2e..92bbad70 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/CheckComboBoxDemoCtl.xaml
@@ -10,44 +10,44 @@
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ComboBoxDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ComboBoxDemoCtl.xaml
index 2b6d7aae..6d43e5da 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ComboBoxDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/ComboBoxDemoCtl.xaml
@@ -10,34 +10,34 @@
-
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DatePickerDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DatePickerDemoCtl.xaml
index b7dd79c6..7d884cf2 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DatePickerDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DatePickerDemoCtl.xaml
@@ -10,23 +10,23 @@
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DateTimePickerDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DateTimePickerDemoCtl.xaml
index 0f14ce55..f57eb253 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DateTimePickerDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/DateTimePickerDemoCtl.xaml
@@ -9,43 +9,43 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml
index 5ddf70dd..826f87b9 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml
@@ -10,17 +10,17 @@
-
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
@@ -30,25 +30,25 @@
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
@@ -58,14 +58,14 @@
-
-
+
+
-
-
-
-
-
+
+
+
+
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PasswordBoxDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PasswordBoxDemoCtl.xaml
index 0059b3cc..8754db75 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PasswordBoxDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/PasswordBoxDemoCtl.xaml
@@ -9,26 +9,26 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SearchBarDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SearchBarDemoCtl.xaml
index 7930304c..cd475d9f 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SearchBarDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/SearchBarDemoCtl.xaml
@@ -9,58 +9,58 @@
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
-
+
+
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TimePickerDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TimePickerDemoCtl.xaml
index e759475d..40bb31fb 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TimePickerDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/TimePickerDemoCtl.xaml
@@ -9,31 +9,31 @@
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
@@ -44,7 +44,7 @@
-
+
@@ -55,7 +55,7 @@
-
+
@@ -66,19 +66,19 @@
-
-
+
+
-
+
-
+
@@ -89,7 +89,7 @@
-
+
diff --git a/src/Shared/HandyControl_Shared/Controls/Attach/InfoElement.cs b/src/Shared/HandyControl_Shared/Controls/Attach/InfoElement.cs
index ff6c5422..9dd7bfeb 100644
--- a/src/Shared/HandyControl_Shared/Controls/Attach/InfoElement.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Attach/InfoElement.cs
@@ -39,7 +39,7 @@ public class InfoElement : TitleElement
/// 内容高度
///
public static readonly DependencyProperty ContentHeightProperty = DependencyProperty.RegisterAttached(
- "ContentHeight", typeof(double), typeof(InfoElement), new FrameworkPropertyMetadata(30.0, FrameworkPropertyMetadataOptions.Inherits));
+ "ContentHeight", typeof(double), typeof(InfoElement), new FrameworkPropertyMetadata(28.0, FrameworkPropertyMetadataOptions.Inherits));
public static void SetContentHeight(DependencyObject element, double value) => element.SetValue(ContentHeightProperty, value);
@@ -49,7 +49,7 @@ public class InfoElement : TitleElement
/// 最小内容高度
///
public static readonly DependencyProperty MinContentHeightProperty = DependencyProperty.RegisterAttached(
- "MinContentHeight", typeof(double), typeof(InfoElement), new PropertyMetadata(30.0));
+ "MinContentHeight", typeof(double), typeof(InfoElement), new PropertyMetadata(28.0));
public static void SetMinContentHeight(DependencyObject element, double value)
=> element.SetValue(MinContentHeightProperty, value);
diff --git a/src/Shared/HandyControl_Shared/Controls/Attach/TitleElement.cs b/src/Shared/HandyControl_Shared/Controls/Attach/TitleElement.cs
index 4d0334c3..3d47bfaf 100644
--- a/src/Shared/HandyControl_Shared/Controls/Attach/TitleElement.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Attach/TitleElement.cs
@@ -85,6 +85,15 @@ public class TitleElement
public static Thickness GetMarginOnTheLeft(DependencyObject element)
=> (Thickness) element.GetValue(MarginOnTheLeftProperty);
+ public static readonly DependencyProperty MarginOnTheTopProperty = DependencyProperty.RegisterAttached(
+ "MarginOnTheTop", typeof(Thickness), typeof(TitleElement), new FrameworkPropertyMetadata(default(Thickness), FrameworkPropertyMetadataOptions.Inherits));
+
+ public static void SetMarginOnTheTop(DependencyObject element, Thickness value)
+ => element.SetValue(MarginOnTheTopProperty, value);
+
+ public static Thickness GetMarginOnTheTop(DependencyObject element)
+ => (Thickness) element.GetValue(MarginOnTheTopProperty);
+
public static readonly DependencyProperty PaddingProperty = DependencyProperty.RegisterAttached(
"Padding", typeof(Thickness), typeof(TitleElement), new FrameworkPropertyMetadata(default(Thickness), FrameworkPropertyMetadataOptions.Inherits));
diff --git a/src/Shared/HandyControl_Shared/Controls/Block/ToggleBlock.cs b/src/Shared/HandyControl_Shared/Controls/Block/ToggleBlock.cs
index 7ec2d88d..806a156a 100644
--- a/src/Shared/HandyControl_Shared/Controls/Block/ToggleBlock.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Block/ToggleBlock.cs
@@ -1,7 +1,10 @@
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Markup;
using HandyControl.Data;
+using HandyControl.Interactivity;
namespace HandyControl.Controls;
@@ -10,9 +13,13 @@ namespace HandyControl.Controls;
///
public class ToggleBlock : Control
{
- public static readonly DependencyProperty IsCheckedProperty = DependencyProperty.Register(
- nameof(IsChecked), typeof(bool?), typeof(ToggleBlock), new FrameworkPropertyMetadata(ValueBoxes.FalseBox,
- FrameworkPropertyMetadataOptions.BindsTwoWayByDefault | FrameworkPropertyMetadataOptions.Journal));
+ public static readonly DependencyProperty IsCheckedProperty = DependencyProperty.Register(nameof(IsChecked), typeof(bool?), typeof(ToggleBlock), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault | FrameworkPropertyMetadataOptions.Journal));
+ public static readonly DependencyProperty CheckedContentProperty = DependencyProperty.Register(nameof(CheckedContent), typeof(object), typeof(ToggleBlock), new PropertyMetadata(default(object)));
+ public static readonly DependencyProperty UnCheckedContentProperty = DependencyProperty.Register(nameof(UnCheckedContent), typeof(object), typeof(ToggleBlock), new PropertyMetadata(default(object)));
+ public static readonly DependencyProperty IndeterminateContentProperty = DependencyProperty.Register(nameof(IndeterminateContent), typeof(object), typeof(ToggleBlock), new PropertyMetadata(default(object)));
+ public static readonly DependencyProperty ToggleGestureProperty = DependencyProperty.Register(nameof(ToggleGesture), typeof(MouseGesture), typeof(ToggleBlock), new UIPropertyMetadata(new MouseGesture(MouseAction.None), OnToggleGestureChanged));
+
+ private MouseBinding _toggleBinding;
[Category("Appearance")]
[TypeConverter(typeof(NullableBoolConverter))]
@@ -29,30 +36,52 @@ public class ToggleBlock : Control
set => SetValue(IsCheckedProperty, value.HasValue ? ValueBoxes.BooleanBox(value.Value) : null);
}
- public static readonly DependencyProperty CheckedContentProperty = DependencyProperty.Register(
- nameof(CheckedContent), typeof(object), typeof(ToggleBlock), new PropertyMetadata(default(object)));
-
public object CheckedContent
{
get => GetValue(CheckedContentProperty);
set => SetValue(CheckedContentProperty, value);
}
- public static readonly DependencyProperty UnCheckedContentProperty = DependencyProperty.Register(
- nameof(UnCheckedContent), typeof(object), typeof(ToggleBlock), new PropertyMetadata(default(object)));
-
public object UnCheckedContent
{
get => GetValue(UnCheckedContentProperty);
set => SetValue(UnCheckedContentProperty, value);
}
- public static readonly DependencyProperty IndeterminateContentProperty = DependencyProperty.Register(
- nameof(IndeterminateContent), typeof(object), typeof(ToggleBlock), new PropertyMetadata(default(object)));
-
public object IndeterminateContent
{
get => GetValue(IndeterminateContentProperty);
set => SetValue(IndeterminateContentProperty, value);
}
+
+ [ValueSerializer(typeof(MouseGestureValueSerializer))]
+ [TypeConverter(typeof(MouseGestureConverter))]
+ public MouseGesture ToggleGesture
+ {
+ get => (MouseGesture) GetValue(ToggleGestureProperty);
+ set => SetValue(ToggleGestureProperty, value);
+ }
+
+ public ToggleBlock()
+ {
+ CommandBindings.Add(new CommandBinding(ControlCommands.Toggle, OnToggled));
+ OnToggleGestureChanged(ToggleGesture);
+ }
+
+ private static void OnToggleGestureChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ ((ToggleBlock) d).OnToggleGestureChanged((MouseGesture) e.NewValue);
+ }
+
+ private void OnToggleGestureChanged(MouseGesture newValue)
+ {
+ InputBindings.Remove(_toggleBinding);
+ _toggleBinding = new MouseBinding(ControlCommands.Toggle, newValue);
+ InputBindings.Add(_toggleBinding);
+ }
+
+ private void OnToggled(object sender, ExecutedRoutedEventArgs e)
+ {
+ SetCurrentValue(IsCheckedProperty, IsChecked == true ? ValueBoxes.FalseBox : ValueBoxes.TrueBox);
+ }
}
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
index 1d889068..85a73296 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
@@ -12,7 +12,7 @@ namespace HandyControl.Controls;
[TemplatePart(Name = ElementPanel, Type = typeof(Panel))]
[TemplatePart(Name = ElementSelectAll, Type = typeof(CheckComboBoxItem))]
-public class CheckComboBox : ListBox, IDataInput
+public class CheckComboBox : ListBox
{
private const string ElementPanel = "PART_Panel";
@@ -24,42 +24,6 @@ public class CheckComboBox : ListBox, IDataInput
private bool _isInternalAction;
- public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
- nameof(IsError), typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
-
- public bool IsError
- {
- get => (bool) GetValue(IsErrorProperty);
- set => SetValue(IsErrorProperty, ValueBoxes.BooleanBox(value));
- }
-
- public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
- nameof(ErrorStr), typeof(string), typeof(CheckComboBox), new PropertyMetadata(default(string)));
-
- public string ErrorStr
- {
- get => (string) GetValue(ErrorStrProperty);
- set => SetValue(ErrorStrProperty, value);
- }
-
- public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
- nameof(TextType), typeof(TextType), typeof(CheckComboBox), new PropertyMetadata(default(TextType)));
-
- public TextType TextType
- {
- get => (TextType) GetValue(TextTypeProperty);
- set => SetValue(TextTypeProperty, value);
- }
-
- public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
- nameof(ShowClearButton), typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
-
- public bool ShowClearButton
- {
- get => (bool) GetValue(ShowClearButtonProperty);
- set => SetValue(ShowClearButtonProperty, ValueBoxes.BooleanBox(value));
- }
-
public static readonly DependencyProperty MaxDropDownHeightProperty =
System.Windows.Controls.ComboBox.MaxDropDownHeightProperty.AddOwner(typeof(CheckComboBox),
new FrameworkPropertyMetadata(SystemParameters.PrimaryScreenHeight / 3));
@@ -103,6 +67,15 @@ public class CheckComboBox : ListBox, IDataInput
set => SetValue(TagStyleProperty, value);
}
+ public static readonly DependencyProperty TagSpacingProperty = DependencyProperty.Register(
+ nameof(TagSpacing), typeof(double), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.Double0Box));
+
+ public double TagSpacing
+ {
+ get => (double) GetValue(TagSpacingProperty);
+ set => SetValue(TagSpacingProperty, value);
+ }
+
public static readonly DependencyProperty ShowSelectAllButtonProperty = DependencyProperty.Register(
nameof(ShowSelectAllButton), typeof(bool), typeof(CheckComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
@@ -146,59 +119,9 @@ public class CheckComboBox : ListBox, IDataInput
UpdateTags();
}
- public bool VerifyData()
- {
- OperationResult result;
-
- if (VerifyFunc != null)
- {
- result = VerifyFunc.Invoke(null);
- }
- else
- {
- if (SelectedItems.Count > 0)
- {
- result = OperationResult.Success();
- }
- else if (InfoElement.GetNecessary(this))
- {
- result = OperationResult.Failed(Properties.Langs.Lang.IsNecessary);
- }
- else
- {
- result = OperationResult.Success();
- }
- }
-
- var isError = !result.Data;
- if (isError)
- {
- SetCurrentValue(IsErrorProperty, ValueBoxes.TrueBox);
- SetCurrentValue(ErrorStrProperty, result.Message);
- }
- else
- {
- isError = Validation.GetHasError(this);
- if (isError)
- {
- SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString());
- }
- else
- {
- SetCurrentValue(IsErrorProperty, ValueBoxes.FalseBox);
- SetCurrentValue(ErrorStrProperty, default(string));
- }
- }
-
- return !isError;
- }
-
- public Func> VerifyFunc { get; set; }
-
protected override void OnSelectionChanged(SelectionChangedEventArgs e)
{
UpdateTags();
- VerifyData();
base.OnSelectionChanged(e);
}
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs
index 812bbe71..4708586f 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs
@@ -17,7 +17,7 @@ namespace HandyControl.Controls;
[TemplatePart(Name = AutoCompletePanel, Type = typeof(Panel))]
[TemplatePart(Name = EditableTextBox, Type = typeof(System.Windows.Controls.TextBox))]
[TemplatePart(Name = AutoPopupAutoComplete, Type = typeof(Popup))]
-public class ComboBox : System.Windows.Controls.ComboBox, IDataInput
+public class ComboBox : System.Windows.Controls.ComboBox
{
#if NET40
@@ -68,8 +68,6 @@ public class ComboBox : System.Windows.Controls.ComboBox, IDataInput
if (_editableTextBox != null)
{
- _editableTextBox.TextChanged += EditableTextBox_TextChanged;
-
_editableTextBox.SetBinding(SelectionBrushProperty, new Binding(SelectionBrushProperty.Name) { Source = this });
#if !(NET40 || NET45 || NET451 || NET452 || NET46 || NET461 || NET462 || NET47 || NET471 || NET472)
_editableTextBox.SetBinding(SelectionTextBrushProperty, new Binding(SelectionTextBrushProperty.Name) { Source = this });
@@ -114,11 +112,6 @@ public class ComboBox : System.Windows.Controls.ComboBox, IDataInput
#endif
- private void EditableTextBox_TextChanged(object sender, TextChangedEventArgs e)
- {
- VerifyData();
- }
-
private void EditableTextBox_LostFocus(object sender, RoutedEventArgs e)
{
if (_autoPopupAutoComplete != null)
@@ -149,88 +142,16 @@ public class ComboBox : System.Windows.Controls.ComboBox, IDataInput
{
_isAutoCompleteAction = false;
base.OnSelectionChanged(e);
- VerifyData();
#if NET40
_isAutoCompleteAction = true;
#endif
}
- ///
- /// 数据验证委托
- ///
- public Func> VerifyFunc { get; set; }
-
///
/// 数据搜索委托
///
public Func> SearchFunc { get; set; }
- ///
- /// 数据是否错误
- ///
- public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
- nameof(IsError), typeof(bool), typeof(ComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
-
- ///
- /// 数据是否错误
- ///
- public bool IsError
- {
- get => (bool) GetValue(IsErrorProperty);
- set => SetValue(IsErrorProperty, ValueBoxes.BooleanBox(value));
- }
-
- ///
- /// 错误提示
- ///
- public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
- nameof(ErrorStr), typeof(string), typeof(ComboBox), new PropertyMetadata(default(string)));
-
- ///
- /// 错误提示
- ///
- public string ErrorStr
- {
- get => (string) GetValue(ErrorStrProperty);
- set => SetValue(ErrorStrProperty, value);
- }
-
- ///
- /// 文本类型
- ///
- public static readonly DependencyPropertyKey TextTypePropertyKey =
- DependencyProperty.RegisterReadOnly("TextType", typeof(TextType), typeof(ComboBox),
- new PropertyMetadata(default(TextType)));
-
- ///
- /// 文本类型
- ///
- public static readonly DependencyProperty TextTypeProperty = TextTypePropertyKey.DependencyProperty;
-
- ///
- /// 文本类型
- ///
- public TextType TextType
- {
- get => (TextType) GetValue(TextTypeProperty);
- set => SetValue(TextTypeProperty, value);
- }
-
- ///
- /// 是否显示清除按钮
- ///
- public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
- nameof(ShowClearButton), typeof(bool), typeof(ComboBox), new PropertyMetadata(ValueBoxes.FalseBox));
-
- ///
- /// 是否显示清除按钮
- ///
- public bool ShowClearButton
- {
- get => (bool) GetValue(ShowClearButtonProperty);
- set => SetValue(ShowClearButtonProperty, ValueBoxes.BooleanBox(value));
- }
-
///
/// 是否自动完成输入
///
@@ -327,59 +248,6 @@ public class ComboBox : System.Windows.Controls.ComboBox, IDataInput
set => SetValue(CaretBrushProperty, value);
}
- ///
- /// 验证数据
- ///
- ///
- public virtual bool VerifyData()
- {
- OperationResult result;
-
- var value = _editableTextBox == null ? Text : _editableTextBox.Text;
-
- if (VerifyFunc != null)
- {
- result = VerifyFunc.Invoke(value);
- }
- else
- {
- if (!string.IsNullOrEmpty(value))
- {
- result = OperationResult.Success();
- }
- else if (InfoElement.GetNecessary(this))
- {
- result = OperationResult.Failed(Properties.Langs.Lang.IsNecessary);
- }
- else
- {
- result = OperationResult.Success();
- }
- }
-
- var isError = !result.Data;
- if (isError)
- {
- SetCurrentValue(IsErrorProperty, ValueBoxes.TrueBox);
- SetCurrentValue(ErrorStrProperty, result.Message);
- }
- else
- {
- isError = Validation.GetHasError(this);
- if (isError)
- {
- SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString());
- }
- else
- {
- SetCurrentValue(IsErrorProperty, ValueBoxes.FalseBox);
- SetCurrentValue(ErrorStrProperty, default(string));
- }
- }
-
- return !isError;
- }
-
///
/// 更新搜索的项目
///
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs b/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs
index 2fb487ff..400b0d03 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs
@@ -1,17 +1,14 @@
-using System;
-using System.Windows;
-using System.Windows.Controls;
+using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Media;
-using HandyControl.Data;
using HandyControl.Interactivity;
namespace HandyControl.Controls;
[TemplatePart(Name = ElementTextBox, Type = typeof(DatePickerTextBox))]
-public class DatePicker : System.Windows.Controls.DatePicker, IDataInput
+public class DatePicker : System.Windows.Controls.DatePicker
{
private const string ElementTextBox = "PART_TextBox";
@@ -28,11 +25,6 @@ public class DatePicker : System.Windows.Controls.DatePicker, IDataInput
public override void OnApplyTemplate()
{
- if (_textBox != null)
- {
- _textBox.TextChanged -= TextBox_TextChanged;
- }
-
base.OnApplyTemplate();
_textBox = GetTemplateChild(ElementTextBox) as System.Windows.Controls.TextBox;
@@ -44,51 +36,9 @@ public class DatePicker : System.Windows.Controls.DatePicker, IDataInput
#endif
_textBox.SetBinding(SelectionOpacityProperty, new Binding(SelectionOpacityProperty.Name) { Source = this });
_textBox.SetBinding(CaretBrushProperty, new Binding(CaretBrushProperty.Name) { Source = this });
-
- _textBox.TextChanged += TextBox_TextChanged;
}
}
- private void TextBox_TextChanged(object sender, TextChangedEventArgs e) => VerifyData();
-
- public Func> VerifyFunc { get; set; }
-
- public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
- nameof(IsError), typeof(bool), typeof(DatePicker), new PropertyMetadata(ValueBoxes.FalseBox));
-
- public bool IsError
- {
- get => (bool) GetValue(IsErrorProperty);
- set => SetValue(IsErrorProperty, ValueBoxes.BooleanBox(value));
- }
-
- public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
- nameof(ErrorStr), typeof(string), typeof(DatePicker), new PropertyMetadata(default(string)));
-
- public string ErrorStr
- {
- get => (string) GetValue(ErrorStrProperty);
- set => SetValue(ErrorStrProperty, value);
- }
-
- public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
- nameof(TextType), typeof(TextType), typeof(DatePicker), new PropertyMetadata(default(TextType)));
-
- public TextType TextType
- {
- get => (TextType) GetValue(TextTypeProperty);
- set => SetValue(TextTypeProperty, value);
- }
-
- public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
- nameof(ShowClearButton), typeof(bool), typeof(DatePicker), new PropertyMetadata(ValueBoxes.FalseBox));
-
- public bool ShowClearButton
- {
- get => (bool) GetValue(ShowClearButtonProperty);
- set => SetValue(ShowClearButtonProperty, ValueBoxes.BooleanBox(value));
- }
-
public static readonly DependencyProperty SelectionBrushProperty =
TextBoxBase.SelectionBrushProperty.AddOwner(typeof(DatePicker));
@@ -128,50 +78,4 @@ public class DatePicker : System.Windows.Controls.DatePicker, IDataInput
get => (Brush) GetValue(CaretBrushProperty);
set => SetValue(CaretBrushProperty, value);
}
-
- public virtual bool VerifyData()
- {
- OperationResult result;
-
- if (VerifyFunc != null)
- {
- result = VerifyFunc.Invoke(Text);
- }
- else
- {
- if (!string.IsNullOrEmpty(Text))
- {
- result = OperationResult.Success();
- }
- else if (InfoElement.GetNecessary(this))
- {
- result = OperationResult.Failed(Properties.Langs.Lang.IsNecessary);
- }
- else
- {
- result = OperationResult.Success();
- }
- }
-
- var isError = !result.Data;
- if (isError)
- {
- SetCurrentValue(IsErrorProperty, ValueBoxes.TrueBox);
- SetCurrentValue(ErrorStrProperty, result.Message);
- }
- else
- {
- isError = Validation.GetHasError(this);
- if (isError)
- {
- SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString());
- }
- else
- {
- SetCurrentValue(IsErrorProperty, ValueBoxes.FalseBox);
- SetCurrentValue(ErrorStrProperty, default(string));
- }
- }
- return !isError;
- }
}
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs b/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs
index 51ab33e3..060496e0 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs
@@ -20,7 +20,7 @@ namespace HandyControl.Controls;
[TemplatePart(Name = ElementTextBox, Type = typeof(WatermarkTextBox))]
[TemplatePart(Name = ElementButton, Type = typeof(Button))]
[TemplatePart(Name = ElementPopup, Type = typeof(Popup))]
-public class DateTimePicker : Control, IDataInput
+public class DateTimePicker : Control
{
#region Constants
@@ -238,44 +238,6 @@ public class DateTimePicker : Control, IDataInput
SetCurrentValue(TextProperty, value);
}
- public Func> VerifyFunc { get; set; }
-
- public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
- nameof(IsError), typeof(bool), typeof(DateTimePicker), new PropertyMetadata(ValueBoxes.FalseBox));
-
- public bool IsError
- {
- get => (bool) GetValue(IsErrorProperty);
- set => SetValue(IsErrorProperty, ValueBoxes.BooleanBox(value));
- }
-
- public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
- nameof(ErrorStr), typeof(string), typeof(DateTimePicker), new PropertyMetadata(default(string)));
-
- public string ErrorStr
- {
- get => (string) GetValue(ErrorStrProperty);
- set => SetValue(ErrorStrProperty, value);
- }
-
- public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
- nameof(TextType), typeof(TextType), typeof(DateTimePicker), new PropertyMetadata(default(TextType)));
-
- public TextType TextType
- {
- get => (TextType) GetValue(TextTypeProperty);
- set => SetValue(TextTypeProperty, value);
- }
-
- public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
- nameof(ShowClearButton), typeof(bool), typeof(DateTimePicker), new PropertyMetadata(ValueBoxes.FalseBox));
-
- public bool ShowClearButton
- {
- get => (bool) GetValue(ShowClearButtonProperty);
- set => SetValue(ShowClearButtonProperty, ValueBoxes.BooleanBox(value));
- }
-
public static readonly DependencyProperty SelectionBrushProperty =
TextBoxBase.SelectionBrushProperty.AddOwner(typeof(DateTimePicker));
@@ -405,52 +367,6 @@ public class DateTimePicker : Control, IDataInput
}
}
- public virtual bool VerifyData()
- {
- OperationResult result;
-
- if (VerifyFunc != null)
- {
- result = VerifyFunc.Invoke(Text);
- }
- else
- {
- if (!string.IsNullOrEmpty(Text))
- {
- result = OperationResult.Success();
- }
- else if (InfoElement.GetNecessary(this))
- {
- result = OperationResult.Failed(Properties.Langs.Lang.IsNecessary);
- }
- else
- {
- result = OperationResult.Success();
- }
- }
-
- var isError = !result.Data;
- if (isError)
- {
- SetCurrentValue(IsErrorProperty, ValueBoxes.TrueBox);
- SetCurrentValue(ErrorStrProperty, result.Message);
- }
- else
- {
- isError = Validation.GetHasError(this);
- if (isError)
- {
- SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString());
- }
- else
- {
- SetCurrentValue(IsErrorProperty, ValueBoxes.FalseBox);
- SetCurrentValue(ErrorStrProperty, default(string));
- }
- }
- return !isError;
- }
-
public override string ToString() => SelectedDateTime?.ToString(DateTimeFormat) ?? string.Empty;
#endregion
@@ -527,7 +443,6 @@ public class DateTimePicker : Control, IDataInput
private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
{
SetValueNoCallback(TextProperty, _textBox.Text);
- VerifyData();
}
private bool ProcessDateTimePickerKey(KeyEventArgs e)
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/IDataInput.cs b/src/Shared/HandyControl_Shared/Controls/Input/IDataInput.cs
deleted file mode 100644
index 0ec375c0..00000000
--- a/src/Shared/HandyControl_Shared/Controls/Input/IDataInput.cs
+++ /dev/null
@@ -1,42 +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; }
-}
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs
index 6845310a..51a2bb14 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs
@@ -10,13 +10,12 @@ using System.Windows.Input;
using System.Windows.Media;
using HandyControl.Data;
using HandyControl.Interactivity;
-using HandyControl.Properties.Langs;
namespace HandyControl.Controls;
[TemplatePart(Name = ElementPasswordBox, Type = typeof(System.Windows.Controls.PasswordBox))]
[TemplatePart(Name = ElementTextBox, Type = typeof(System.Windows.Controls.TextBox))]
-public class PasswordBox : Control, IDataInput
+public class PasswordBox : Control
{
private const string ElementPasswordBox = "PART_PasswordBox";
@@ -39,54 +38,6 @@ public class PasswordBox : Control, IDataInput
set => SetValue(PasswordCharProperty, value);
}
- ///
- /// 数据是否错误
- ///
- public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
- nameof(IsError), typeof(bool), typeof(PasswordBox), new PropertyMetadata(ValueBoxes.FalseBox));
-
- public bool IsError
- {
- get => (bool) GetValue(IsErrorProperty);
- set => SetValue(IsErrorProperty, ValueBoxes.BooleanBox(value));
- }
-
- ///
- /// 错误提示
- ///
- public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
- nameof(ErrorStr), typeof(string), typeof(PasswordBox), new PropertyMetadata(default(string)));
-
- public string ErrorStr
- {
- get => (string) GetValue(ErrorStrProperty);
- set => SetValue(ErrorStrProperty, value);
- }
-
- ///
- /// 文本类型
- ///
- public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
- nameof(TextType), typeof(TextType), typeof(PasswordBox), new PropertyMetadata(default(TextType)));
-
- public TextType TextType
- {
- get => (TextType) GetValue(TextTypeProperty);
- set => SetValue(TextTypeProperty, value);
- }
-
- ///
- /// 是否显示清除按钮
- ///
- public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
- nameof(ShowClearButton), typeof(bool), typeof(PasswordBox), new PropertyMetadata(ValueBoxes.FalseBox));
-
- public bool ShowClearButton
- {
- get => (bool) GetValue(ShowClearButtonProperty);
- set => SetValue(ShowClearButtonProperty, ValueBoxes.BooleanBox(value));
- }
-
public static readonly DependencyProperty ShowEyeButtonProperty = DependencyProperty.Register(
nameof(ShowEyeButton), typeof(bool), typeof(PasswordBox), new PropertyMetadata(ValueBoxes.FalseBox));
@@ -234,52 +185,6 @@ public class PasswordBox : Control, IDataInput
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public SecureString SecurePassword => ActualPasswordBox?.SecurePassword;
- public Func> VerifyFunc { get; set; }
-
- public virtual bool VerifyData()
- {
- OperationResult result;
-
- if (VerifyFunc != null)
- {
- result = VerifyFunc.Invoke(ShowEyeButton && ShowPassword
- ? _textBox.Text
- : ActualPasswordBox.Password);
- }
- else
- {
- if (!string.IsNullOrEmpty(ShowEyeButton && ShowPassword
- ? _textBox.Text
- : ActualPasswordBox.Password))
- result = OperationResult.Success();
- else if (InfoElement.GetNecessary(this))
- result = OperationResult.Failed(Lang.IsNecessary);
- else
- result = OperationResult.Success();
- }
-
- var isError = !result.Data;
- if (isError)
- {
- SetCurrentValue(IsErrorProperty, ValueBoxes.TrueBox);
- SetCurrentValue(ErrorStrProperty, result.Message);
- }
- else
- {
- isError = Validation.GetHasError(this);
- if (isError)
- {
- SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString());
- }
- else
- {
- SetCurrentValue(IsErrorProperty, ValueBoxes.FalseBox);
- SetCurrentValue(ErrorStrProperty, default(string));
- }
- }
- return !isError;
- }
-
private static void OnShowPasswordChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var ctl = (PasswordBox) d;
@@ -376,8 +281,6 @@ public class PasswordBox : Control, IDataInput
_textBox.Text = ActualPasswordBox.Password;
}
}
-
- VerifyData();
}
private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
@@ -387,7 +290,5 @@ public class PasswordBox : Control, IDataInput
Password = _textBox.Text;
SetCurrentValue(UnsafePasswordProperty, Password);
}
-
- VerifyData();
}
}
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs b/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs
index fa35785a..21ae19f4 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs
@@ -20,7 +20,7 @@ namespace HandyControl.Controls;
[TemplatePart(Name = ElementTextBox, Type = typeof(WatermarkTextBox))]
[TemplatePart(Name = ElementButton, Type = typeof(Button))]
[TemplatePart(Name = ElementPopup, Type = typeof(Popup))]
-public class TimePicker : Control, IDataInput
+public class TimePicker : Control
{
#region Constants
@@ -260,44 +260,6 @@ public class TimePicker : Control, IDataInput
#endregion Text
- public Func> VerifyFunc { get; set; }
-
- public static readonly DependencyProperty IsErrorProperty = DependencyProperty.Register(
- nameof(IsError), typeof(bool), typeof(TimePicker), new PropertyMetadata(ValueBoxes.FalseBox));
-
- public bool IsError
- {
- get => (bool) GetValue(IsErrorProperty);
- set => SetValue(IsErrorProperty, ValueBoxes.BooleanBox(value));
- }
-
- public static readonly DependencyProperty ErrorStrProperty = DependencyProperty.Register(
- nameof(ErrorStr), typeof(string), typeof(TimePicker), new PropertyMetadata(default(string)));
-
- public string ErrorStr
- {
- get => (string) GetValue(ErrorStrProperty);
- set => SetValue(ErrorStrProperty, value);
- }
-
- public static readonly DependencyProperty TextTypeProperty = DependencyProperty.Register(
- nameof(TextType), typeof(TextType), typeof(TimePicker), new PropertyMetadata(default(TextType)));
-
- public TextType TextType
- {
- get => (TextType) GetValue(TextTypeProperty);
- set => SetValue(TextTypeProperty, value);
- }
-
- public static readonly DependencyProperty ShowClearButtonProperty = DependencyProperty.Register(
- nameof(ShowClearButton), typeof(bool), typeof(TimePicker), new PropertyMetadata(ValueBoxes.FalseBox));
-
- public bool ShowClearButton
- {
- get => (bool) GetValue(ShowClearButtonProperty);
- set => SetValue(ShowClearButtonProperty, ValueBoxes.BooleanBox(value));
- }
-
public static readonly DependencyProperty SelectionBrushProperty =
TextBoxBase.SelectionBrushProperty.AddOwner(typeof(TimePicker));
@@ -371,52 +333,6 @@ public class TimePicker : Control, IDataInput
#region Public Methods
- public virtual bool VerifyData()
- {
- OperationResult result;
-
- if (VerifyFunc != null)
- {
- result = VerifyFunc.Invoke(Text);
- }
- else
- {
- if (!string.IsNullOrEmpty(Text))
- {
- result = OperationResult.Success();
- }
- else if (InfoElement.GetNecessary(this))
- {
- result = OperationResult.Failed(Properties.Langs.Lang.IsNecessary);
- }
- else
- {
- result = OperationResult.Success();
- }
- }
-
- var isError = !result.Data;
- if (isError)
- {
- SetCurrentValue(IsErrorProperty, ValueBoxes.TrueBox);
- SetCurrentValue(ErrorStrProperty, result.Message);
- }
- else
- {
- isError = Validation.GetHasError(this);
- if (isError)
- {
- SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString());
- }
- else
- {
- SetCurrentValue(IsErrorProperty, ValueBoxes.FalseBox);
- SetCurrentValue(ErrorStrProperty, default(string));
- }
- }
- return !isError;
- }
-
public override void OnApplyTemplate()
{
if (DesignerProperties.GetIsInDesignMode(this)) return;
@@ -565,7 +481,6 @@ public class TimePicker : Control, IDataInput
private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
{
SetValueNoCallback(TextProperty, _textBox.Text);
- VerifyData();
}
private bool ProcessTimePickerKey(KeyEventArgs e)
diff --git a/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems b/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems
index 7f7b0a00..4673bbb0 100644
--- a/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems
+++ b/src/Shared/HandyControl_Shared/HandyControl_Shared.projitems
@@ -204,7 +204,6 @@
-
diff --git a/src/Shared/HandyControl_Shared/Interactivity/Commands/ControlCommands.cs b/src/Shared/HandyControl_Shared/Interactivity/Commands/ControlCommands.cs
index 8a03934f..015d63dc 100644
--- a/src/Shared/HandyControl_Shared/Interactivity/Commands/ControlCommands.cs
+++ b/src/Shared/HandyControl_Shared/Interactivity/Commands/ControlCommands.cs
@@ -186,4 +186,6 @@ public static class ControlCommands
/// 更多
///
public static RoutedCommand More { get; } = new(nameof(More), typeof(ControlCommands));
+
+ public static RoutedCommand Toggle { get; } = new(nameof(Toggle), typeof(ControlCommands));
}
diff --git a/src/Shared/HandyControl_Shared/Themes/Basic/Sizes.xaml b/src/Shared/HandyControl_Shared/Themes/Basic/Sizes.xaml
index 3c395c06..7c2fadd7 100644
--- a/src/Shared/HandyControl_Shared/Themes/Basic/Sizes.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Basic/Sizes.xaml
@@ -2,9 +2,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib">
- 30
- 10,6
- 8,6
+ 28
+ 20
+ 10,5
+ 8,0
4
30
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/BaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/BaseStyle.xaml
index 9e425e10..51334dbd 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/BaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/BaseStyle.xaml
@@ -6,7 +6,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
@@ -26,7 +26,7 @@
-
+
@@ -36,7 +36,7 @@
-
+
@@ -45,40 +45,41 @@
-
-
+
+
-
+
-
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml
index caa3f63d..f4b3c539 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/CheckComboBoxBaseStyle.xaml
@@ -1,64 +1,25 @@
-
+
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
-
+
@@ -266,327 +221,307 @@
-
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
-
+
-
-
-
-
-
-
-
-
-
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ComboBoxBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ComboBoxBaseStyle.xaml
index 617075af..503e2721 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ComboBoxBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ComboBoxBaseStyle.xaml
@@ -1,132 +1,74 @@
-
-
-
-
-
-
-
+
-
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
-
-
-
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
@@ -135,163 +77,184 @@
-
-
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
-
+
-
+
-
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
-
+
-
-
-
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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/DataGridBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/DataGridBaseStyle.xaml
index ee5d2688..70404a75 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/DataGridBaseSt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-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/ComboBox.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/ComboBox.xaml
index acad76dd..72ab23c0 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/ComboBox.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/ComboBox.xaml
@@ -22,7 +22,8 @@
-
+
+
@@ -33,7 +34,8 @@
-
+
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/DataGrid.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/DataGrid.xaml
index 5a2ec0de..7fc1fda1 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/DataGrid.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/DataGrid.xaml
@@ -114,7 +114,7 @@
@@ -23,8 +25,10 @@
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/DateTimePicker.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/DateTimePicker.xaml
index 4f46907b..00e35314 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/DateTimePicker.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/DateTimePicker.xaml
@@ -14,8 +14,10 @@
@@ -23,8 +25,10 @@
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/NumericUpDown.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/NumericUpDown.xaml
index 6f97ba2c..639bb6f7 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/NumericUpDown.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/NumericUpDown.xaml
@@ -6,7 +6,7 @@
@@ -15,7 +15,8 @@
-
+
+
@@ -25,7 +26,8 @@
-
+
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/PasswordBox.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/PasswordBox.xaml
index 261dfc90..7f28b64b 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/PasswordBox.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/PasswordBox.xaml
@@ -14,8 +14,10 @@
@@ -23,8 +25,10 @@
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/SearchBar.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/SearchBar.xaml
index e4b97bc9..1e7df846 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/SearchBar.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/SearchBar.xaml
@@ -6,7 +6,7 @@
@@ -15,7 +15,8 @@
-
+
+
@@ -25,7 +26,8 @@
-
+
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/TextBox.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/TextBox.xaml
index 3d4b22d0..25a268ab 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/TextBox.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/TextBox.xaml
@@ -8,7 +8,7 @@
@@ -17,7 +17,8 @@
-
+
+
@@ -27,7 +28,8 @@
-
+
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/TimePicker.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/TimePicker.xaml
index 204d49a3..c45cbb43 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/TimePicker.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/TimePicker.xaml
@@ -14,8 +14,10 @@
@@ -23,8 +25,10 @@
diff --git a/src/Shared/HandyControl_Shared/Themes/Theme.xaml b/src/Shared/HandyControl_Shared/Themes/Theme.xaml
index 04b36b5d..29a9f71e 100644
--- a/src/Shared/HandyControl_Shared/Themes/Theme.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Theme.xaml
@@ -97,9 +97,10 @@
- 30
- 10,6
- 8,6
+ 28
+ 20
+ 10,5
+ 8,0
4
30
@@ -1214,7 +1215,8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-
+
-
-
-
-
-
-
-
-
-
-
+
@@ -13460,14 +13046,15 @@
@@ -13475,7 +13062,8 @@
-
+
+
@@ -14256,15 +13848,19 @@
diff --git a/src/Shared/HandyControl_Shared/Tools/Converter/ThicknessSplitConverter.cs b/src/Shared/HandyControl_Shared/Tools/Converter/ThicknessSplitConverter.cs
index 89433e05..8fd89f3a 100644
--- a/src/Shared/HandyControl_Shared/Tools/Converter/ThicknessSplitConverter.cs
+++ b/src/Shared/HandyControl_Shared/Tools/Converter/ThicknessSplitConverter.cs
@@ -14,13 +14,35 @@ public class ThicknessSplitConverter : IValueConverter
if (parameter is string str)
{
var arr = str.Split(',');
- if (arr.Length != 4) return thickness;
- return new Thickness(
- arr[0].Equals("1") ? thickness.Left : 0,
- arr[1].Equals("1") ? thickness.Top : 0,
- arr[2].Equals("1") ? thickness.Right : 0,
- arr[3].Equals("1") ? thickness.Bottom : 0);
+ if (arr.Length != 4)
+ {
+ return thickness;
+ }
+
+ var result = new Thickness(thickness.Left, thickness.Top, thickness.Right, thickness.Bottom);
+
+ if (double.TryParse(arr[0], out double leftTimes))
+ {
+ result.Left = leftTimes * thickness.Left;
+ }
+
+ if (double.TryParse(arr[1], out double topTimes))
+ {
+ result.Top = topTimes * thickness.Top;
+ }
+
+ if (double.TryParse(arr[2], out double rightTimes))
+ {
+ result.Right = rightTimes * thickness.Right;
+ }
+
+ if (double.TryParse(arr[3], out double bottomTimes))
+ {
+ result.Bottom = bottomTimes * thickness.Bottom;
+ }
+
+ return result;
}
}
return value;