From a68b0213a66c36a75750ccda22407a666d269721 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Thu, 20 Sep 2018 16:09:43 +0800
Subject: [PATCH] modify button, toggle button style
---
.../Controls/Attach/StatusSwitchElement.cs | 13 ++
HandyControl/Controls/Carousel.xaml | 4 +-
HandyControl/Controls/Carousel.xaml.cs | 2 +-
HandyControl/Controls/ColorPicker.xaml.cs | 2 +-
HandyControl/Controls/Growl.xaml | 6 +-
.../Controls/Info/InfoNumericUpDown.xaml | 6 +-
HandyControl/Controls/Info/InfoTextBox.xaml | 2 +-
HandyControl/Controls/Pagination.xaml | 4 +-
.../Controls/Window/ImageBrowser.xaml | 16 +-
HandyControl/Controls/Window/PopupWindow.xaml | 6 +-
HandyControl/HandyControl.csproj | 4 -
HandyControl/Properties/AssemblyInfo.cs | 4 +-
.../Themes/Styles/Base/ButtonBaseStyle.xaml | 44 ++--
.../Styles/Base/ToggleButtonBaseStyle.xaml | 203 +++++++++++++++++-
.../Base/ToggleButtonSwitchBaseStyle.xaml | 186 ----------------
HandyControl/Themes/Styles/Button.xaml | 38 ++--
HandyControl/Themes/Styles/Expander.xaml | 2 +-
HandyControl/Themes/Styles/Style.xaml | 2 +-
HandyControl/Themes/Styles/TabControl.xaml | 2 +-
HandyControl/Themes/Styles/ToggleButton.xaml | 30 ++-
HandyControl/Themes/Styles/Window.xaml | 8 +-
HandyControlDemo/Properties/AssemblyInfo.cs | 4 +-
.../Properties/Langs/Lang.Designer.cs | 18 ++
.../Properties/Langs/Lang.en.resx | 6 +
HandyControlDemo/Properties/Langs/Lang.resx | 6 +
.../UserControl/Main/NoUserContent.xaml | 2 +-
.../UserControl/Styles/ButtonDemoCtl.xaml | 58 ++---
.../Styles/ToggleButtonDemoCtl.xaml | 105 +++++----
28 files changed, 430 insertions(+), 353 deletions(-)
delete mode 100644 HandyControl/Themes/Styles/Base/ToggleButtonSwitchBaseStyle.xaml
diff --git a/HandyControl/Controls/Attach/StatusSwitchElement.cs b/HandyControl/Controls/Attach/StatusSwitchElement.cs
index 6c52ab80..1c3f3e1a 100644
--- a/HandyControl/Controls/Attach/StatusSwitchElement.cs
+++ b/HandyControl/Controls/Attach/StatusSwitchElement.cs
@@ -5,11 +5,24 @@ namespace HandyControl.Controls
{
public class StatusSwitchElement
{
+ ///
+ /// 选中时展示的元素
+ ///
public static readonly DependencyProperty CheckedElementProperty = DependencyProperty.RegisterAttached(
"CheckedElement", typeof(object), typeof(StatusSwitchElement), new PropertyMetadata(default(object)));
public static void SetCheckedElement(DependencyObject element, object value) => element.SetValue(CheckedElementProperty, value);
public static object GetCheckedElement(DependencyObject element) => element.GetValue(CheckedElementProperty);
+
+ ///
+ /// 是否隐藏元素
+ ///
+ public static readonly DependencyProperty HiddenElementProperty = DependencyProperty.RegisterAttached(
+ "HiddenElement", typeof(bool), typeof(StatusSwitchElement), new PropertyMetadata(default(bool)));
+
+ public static void SetHiddenElement(DependencyObject element, bool value) => element.SetValue(HiddenElementProperty, value);
+
+ public static bool GetHiddenElement(DependencyObject element) => (bool) element.GetValue(HiddenElementProperty);
}
}
\ No newline at end of file
diff --git a/HandyControl/Controls/Carousel.xaml b/HandyControl/Controls/Carousel.xaml
index ef82e01e..942c03ee 100644
--- a/HandyControl/Controls/Carousel.xaml
+++ b/HandyControl/Controls/Carousel.xaml
@@ -28,12 +28,12 @@
-
diff --git a/HandyControl/Controls/Info/InfoTextBox.xaml b/HandyControl/Controls/Info/InfoTextBox.xaml
index 18930a13..4889a9e2 100644
--- a/HandyControl/Controls/Info/InfoTextBox.xaml
+++ b/HandyControl/Controls/Info/InfoTextBox.xaml
@@ -54,7 +54,7 @@
-
+
diff --git a/HandyControl/Controls/Pagination.xaml b/HandyControl/Controls/Pagination.xaml
index a7cc89d4..9b3c1af9 100644
--- a/HandyControl/Controls/Pagination.xaml
+++ b/HandyControl/Controls/Pagination.xaml
@@ -16,7 +16,7 @@
-
+
@@ -31,7 +31,7 @@
-
+
diff --git a/HandyControl/Controls/Window/ImageBrowser.xaml b/HandyControl/Controls/Window/ImageBrowser.xaml
index 3897295e..8a86cd12 100644
--- a/HandyControl/Controls/Window/ImageBrowser.xaml
+++ b/HandyControl/Controls/Window/ImageBrowser.xaml
@@ -44,22 +44,22 @@
-
-
+
+
-
+
-
-
+
+
-
-
+
+
@@ -75,7 +75,7 @@
-
+
\ No newline at end of file
diff --git a/HandyControl/Controls/Window/PopupWindow.xaml b/HandyControl/Controls/Window/PopupWindow.xaml
index 5d1d6f54..4a3f1660 100644
--- a/HandyControl/Controls/Window/PopupWindow.xaml
+++ b/HandyControl/Controls/Window/PopupWindow.xaml
@@ -36,7 +36,7 @@
-
+
@@ -44,12 +44,12 @@
-
+
-
+
diff --git a/HandyControl/HandyControl.csproj b/HandyControl/HandyControl.csproj
index 70930dde..2920c019 100644
--- a/HandyControl/HandyControl.csproj
+++ b/HandyControl/HandyControl.csproj
@@ -287,10 +287,6 @@
Designer
MSBuild:Compile
-
- Designer
- MSBuild:Compile
-
Designer
MSBuild:Compile
diff --git a/HandyControl/Properties/AssemblyInfo.cs b/HandyControl/Properties/AssemblyInfo.cs
index b361fd77..3ab8d9c0 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.2.2.0")]
-[assembly: AssemblyFileVersion("1.2.2.0")]
+[assembly: AssemblyVersion("1.2.2.1")]
+[assembly: AssemblyFileVersion("1.2.2.1")]
diff --git a/HandyControl/Themes/Styles/Base/ButtonBaseStyle.xaml b/HandyControl/Themes/Styles/Base/ButtonBaseStyle.xaml
index 309e8634..3a6e62c8 100644
--- a/HandyControl/Themes/Styles/Base/ButtonBaseStyle.xaml
+++ b/HandyControl/Themes/Styles/Base/ButtonBaseStyle.xaml
@@ -7,34 +7,6 @@
-
-
+
+
+
+
+
-
-
-
-
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Button.xaml b/HandyControl/Themes/Styles/Button.xaml
index dad7de8f..c0137f70 100644
--- a/HandyControl/Themes/Styles/Button.xaml
+++ b/HandyControl/Themes/Styles/Button.xaml
@@ -3,20 +3,28 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
-
+
-
-
-
-
-
-
-
-
-
-
-