From 50707d8952daa0f8da8d661bc2eeb695a7f5cc18 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sun, 1 Oct 2023 22:09:05 +0800 Subject: [PATCH] enhance: close #1466 --- .../HandyControl_Net_40/Themes/Theme.xaml | 87 +++++++++++++++++++ .../Controls/Attach/InfoElement.cs | 7 ++ .../Styles/Base/DatePickerBaseStyle.xaml | 31 ++++++- .../Styles/Base/DateTimePickerBaseStyle.xaml | 29 +++++++ .../Styles/Base/TimePickerBaseStyle.xaml | 29 +++++++ .../HandyControl_Shared/Themes/Theme.xaml | 87 +++++++++++++++++++ 6 files changed, 269 insertions(+), 1 deletion(-) diff --git a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml index d05e3d43..d1a5e208 100644 --- a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml +++ b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml @@ -8030,6 +8030,11 @@ + + + + + @@ -8080,6 +8085,11 @@ + + + + + @@ -8127,6 +8137,11 @@ + + + + + @@ -8189,6 +8204,12 @@ + + + + + + @@ -8210,6 +8231,7 @@ + @@ -8245,6 +8267,12 @@ + + + + + + @@ -8266,6 +8294,7 @@ + @@ -8303,6 +8332,11 @@ + + + + + @@ -8353,6 +8387,11 @@ + + + + + @@ -8400,6 +8439,11 @@ + + + + + @@ -8462,6 +8506,12 @@ + + + + + + @@ -8483,6 +8533,7 @@ + @@ -8518,6 +8569,12 @@ + + + + + + @@ -8539,6 +8596,7 @@ + @@ -10939,6 +10997,11 @@ + + + + + @@ -10989,6 +11052,11 @@ + + + + + @@ -11036,6 +11104,11 @@ + + + + + @@ -11098,6 +11171,12 @@ + + + + + + @@ -11119,6 +11198,7 @@ + @@ -11154,6 +11234,12 @@ + + + + + + @@ -11175,6 +11261,7 @@ + diff --git a/src/Shared/HandyControl_Shared/Controls/Attach/InfoElement.cs b/src/Shared/HandyControl_Shared/Controls/Attach/InfoElement.cs index 9dd7bfeb..c00263ae 100644 --- a/src/Shared/HandyControl_Shared/Controls/Attach/InfoElement.cs +++ b/src/Shared/HandyControl_Shared/Controls/Attach/InfoElement.cs @@ -89,4 +89,11 @@ public class InfoElement : TitleElement public static bool GetShowClearButton(DependencyObject element) => (bool) element.GetValue(ShowClearButtonProperty); + + public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.RegisterAttached( + "IsReadOnly", typeof(bool), typeof(InfoElement), new PropertyMetadata(ValueBoxes.FalseBox)); + + public static void SetIsReadOnly(DependencyObject element, bool value) => element.SetValue(IsReadOnlyProperty, ValueBoxes.BooleanBox(value)); + + public static bool GetIsReadOnly(DependencyObject element) => (bool) element.GetValue(IsReadOnlyProperty); } diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/DatePickerBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/DatePickerBaseStyle.xaml index e1ecd563..a14e318e 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/DatePickerBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/DatePickerBaseStyle.xaml @@ -40,6 +40,11 @@ + + + + + @@ -91,6 +96,11 @@ + + + + + @@ -139,6 +149,11 @@ + + + + + @@ -203,8 +218,14 @@ + + + + + + - + @@ -224,6 +245,7 @@ + @@ -260,6 +282,12 @@ + + + + + + @@ -281,6 +309,7 @@ + diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/DateTimePickerBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/DateTimePickerBaseStyle.xaml index 6c5913c6..34b9709a 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/DateTimePickerBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/DateTimePickerBaseStyle.xaml @@ -20,6 +20,11 @@ + + + + + @@ -71,6 +76,11 @@ + + + + + @@ -119,6 +129,11 @@ + + + + + @@ -183,6 +198,12 @@ + + + + + + @@ -204,6 +225,7 @@ + @@ -240,6 +262,12 @@ + + + + + + @@ -261,6 +289,7 @@ + diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/TimePickerBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/TimePickerBaseStyle.xaml index 457d9590..c7f8c192 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/TimePickerBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/TimePickerBaseStyle.xaml @@ -20,6 +20,11 @@ + + + + + @@ -71,6 +76,11 @@ + + + + + @@ -119,6 +129,11 @@ + + + + + @@ -183,6 +198,12 @@ + + + + + + @@ -204,6 +225,7 @@ + @@ -240,6 +262,12 @@ + + + + + + @@ -261,6 +289,7 @@ + diff --git a/src/Shared/HandyControl_Shared/Themes/Theme.xaml b/src/Shared/HandyControl_Shared/Themes/Theme.xaml index aee5952e..f47666e2 100644 --- a/src/Shared/HandyControl_Shared/Themes/Theme.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Theme.xaml @@ -8149,6 +8149,11 @@ + + + + + @@ -8199,6 +8204,11 @@ + + + + + @@ -8246,6 +8256,11 @@ + + + + + @@ -8308,6 +8323,12 @@ + + + + + + @@ -8329,6 +8350,7 @@ + @@ -8364,6 +8386,12 @@ + + + + + + @@ -8385,6 +8413,7 @@ + @@ -8422,6 +8451,11 @@ + + + + + @@ -8472,6 +8506,11 @@ + + + + + @@ -8519,6 +8558,11 @@ + + + + + @@ -8581,6 +8625,12 @@ + + + + + + @@ -8602,6 +8652,7 @@ + @@ -8637,6 +8688,12 @@ + + + + + + @@ -8658,6 +8715,7 @@ + @@ -11058,6 +11116,11 @@ + + + + + @@ -11108,6 +11171,11 @@ + + + + + @@ -11155,6 +11223,11 @@ + + + + + @@ -11217,6 +11290,12 @@ + + + + + + @@ -11238,6 +11317,7 @@ + @@ -11273,6 +11353,12 @@ + + + + + + @@ -11294,6 +11380,7 @@ +