From 99d2fafb720ce826223330d5083e3f5aad2907d6 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sun, 13 Mar 2022 18:54:34 +0800 Subject: [PATCH] refactor: massive refactor input elements, step 1/3 --- .../HandyControl_Net_40/Themes/Theme.xaml | 648 ++++++++---------- .../HandyControlDemo_Code.csproj | 6 - .../HandyControlDemo_Shared.projitems | 4 +- .../Service/Data/DataService.cs | 12 - .../ValidationRule/NumericUpDownDemoRule.cs | 19 + .../Controls/CheckComboBoxDemoCtl.xaml | 2 +- .../UserControl/Controls/ComboBoxDemoCtl.xaml | 2 +- .../Controls/NumericUpDownDemoCtl.xaml | 52 +- .../Controls/NumericUpDownDemoCtl.xaml.cs | 11 +- .../Controls/SearchBarDemoCtl.xaml | 50 +- .../UserControl/Controls/TextBoxDemoCtl.xaml | 35 +- .../UserControl/Main/LeftMainContent.xaml | 2 +- .../UserControl/Styles/GroupBoxDemoCtl.xaml | 2 +- .../Styles/NativeComboBoxDemoCtl.xaml | 2 +- .../UserControl/Styles/ToolBarDemoCtl.xaml | 2 +- .../ViewModel/Common/ComboBoxDemoViewModel.cs | 9 - .../Common/InputElementDemoViewModel.cs | 92 +++ .../Controls/SearchBarDemoViewModel.cs | 16 - .../ViewModel/ViewModelLocator.cs | 9 +- .../Controls/Attach/InfoElement.cs | 9 + .../Controls/Input/NumericUpDown.cs | 185 +---- .../Controls/Input/SearchBar.cs | 1 - .../Controls/Input/TextBox.cs | 128 +--- .../HandyControl_Shared.projitems | 2 + .../Themes/Styles/Base/BaseStyle.xaml | 34 + .../Styles/Base/NumericUpDownBaseStyle.xaml | 240 +++---- .../Styles/Base/PropertyGridBaseStyle.xaml | 2 +- .../Styles/Base/SearchBarBaseStyle.xaml | 175 ++--- .../Themes/Styles/Base/TextBoxBaseStyle.xaml | 152 ++-- .../Themes/Styles/NumericUpDown.xaml | 21 + .../Themes/Styles/SearchBar.xaml | 21 + .../Themes/Styles/TextBox.xaml | 12 +- .../HandyControl_Shared/Themes/Theme.xaml | 648 ++++++++---------- .../Tools/ValidationRule/NoBlankTextRule.cs | 24 + .../Tools/ValidationRule/RegexRule.cs | 44 ++ 35 files changed, 1213 insertions(+), 1460 deletions(-) create mode 100644 src/Shared/HandyControlDemo_Shared/Tools/ValidationRule/NumericUpDownDemoRule.cs delete mode 100644 src/Shared/HandyControlDemo_Shared/ViewModel/Common/ComboBoxDemoViewModel.cs create mode 100644 src/Shared/HandyControlDemo_Shared/ViewModel/Common/InputElementDemoViewModel.cs delete mode 100644 src/Shared/HandyControlDemo_Shared/ViewModel/Controls/SearchBarDemoViewModel.cs create mode 100644 src/Shared/HandyControl_Shared/Tools/ValidationRule/NoBlankTextRule.cs create mode 100644 src/Shared/HandyControl_Shared/Tools/ValidationRule/RegexRule.cs diff --git a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml index 7ef4398b..8fbfb137 100644 --- a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml +++ b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml @@ -1175,6 +1175,37 @@ + + + + + + + + + + + + + - - - - - - - - - - - + - - - - - - - - -