From ee4125e2bf965e795431748c563ba77bc53f9002 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Mon, 27 May 2019 23:32:04 +0800 Subject: [PATCH] add FocusVisualStyle for some controls --- README.md | 2 +- .../HandyControlDemo_Shared/MainWindow.xaml | 2 +- .../Styles/ToggleButtonDemoCtl.xaml | 12 ++++----- .../Controls/ColorPicker/ColorPicker.cs | 2 +- .../HandyControl_Shared.projitems | 4 +++ .../Themes/Styles/Base/BaseStyle.xaml | 21 +++++++++++++++ .../Styles/Base/ButtonBaseBaseStyle.xaml | 3 --- .../Themes/Styles/Base/CheckBoxBaseStyle.xaml | 21 ++++++++++++--- .../Styles/Base/RadioButtonBaseStyle.xaml | 27 ++++++++++++------- .../Styles/Base/RadioGroupBaseStyle.xaml | 2 ++ .../Themes/Styles/Base/SideMenuBaseStyle.xaml | 10 +++++-- .../Styles/Base/ToggleButtonBaseStyle.xaml | 20 ++++++++++---- .../Themes/Styles/Button.xaml | 6 +---- .../Themes/Styles/ColorPicker.xaml | 2 +- .../Themes/Styles/GridSplitter.xaml | 7 +++++ .../Themes/Styles/RepeatButton.xaml | 6 +---- .../Themes/Styles/Style.xaml | 1 + .../Themes/Styles/ToggleButton.xaml | 6 +---- 18 files changed, 107 insertions(+), 47 deletions(-) create mode 100644 src/Shared/HandyControl_Shared/Themes/Styles/GridSplitter.xaml diff --git a/README.md b/README.md index 29fc1921..18acdfdb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![logo](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/icon.png) -![dotnet-version](https://img.shields.io/badge/.net-%3E%3D4.0-blue.svg) ![csharp-version](https://img.shields.io/badge/C%23-7.0-blue.svg) ![IDE-version](https://img.shields.io/badge/IDE-vs2017-blue.svg) [![nuget-version](https://img.shields.io/nuget/v/HandyControl.svg)](https://www.nuget.org/packages/HandyControl) [![build-status](https://ci.appveyor.com/api/projects/status/github/handyorg/handycontrol?svg=true)](https://ci.appveyor.com/project/NaBian/handycontrol) [![Join the chat at https://gitter.im/HandyControl/Lobby](https://badges.gitter.im/HandyControl/Lobby.svg)](https://gitter.im/HandyControl/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![qq-group](https://img.shields.io/badge/qq-714704041-red.svg)](//shang.qq.com/wpa/qunwpa?idkey=a571e5553c9d41e49c4f22f3a8b2865451497a795ff281fedf3285def247efc1) +![dotnet-version](https://img.shields.io/badge/.net-%3E%3D4.0-blue.svg) ![csharp-version](https://img.shields.io/badge/C%23-7.0-blue.svg) ![IDE-version](https://img.shields.io/badge/IDE-vs2017-blue.svg) [![nuget-version](https://img.shields.io/nuget/v/HandyControl.svg)](https://www.nuget.org/packages/HandyControl) [![build-status](https://ci.appveyor.com/api/projects/status/github/handyorg/handycontrol?svg=true)](https://ci.appveyor.com/project/handyorg/handycontrol) [![Join the chat at https://gitter.im/HandyControl/Lobby](https://badges.gitter.im/HandyControl/Lobby.svg)](https://gitter.im/HandyControl/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![qq-group](https://img.shields.io/badge/qq-714704041-red.svg)](//shang.qq.com/wpa/qunwpa?idkey=a571e5553c9d41e49c4f22f3a8b2865451497a795ff281fedf3285def247efc1) [![wiki](https://img.shields.io/badge/wiki-Complete-brightgreen.svg)](https://github.com/ghost1372/HandyControl/wiki) # Welcome to HandyControl diff --git a/src/Shared/HandyControlDemo_Shared/MainWindow.xaml b/src/Shared/HandyControlDemo_Shared/MainWindow.xaml index cde47eb6..ca38791a 100644 --- a/src/Shared/HandyControlDemo_Shared/MainWindow.xaml +++ b/src/Shared/HandyControlDemo_Shared/MainWindow.xaml @@ -15,9 +15,9 @@ OtherButtonHoverForeground="White" OtherButtonForeground="White" Style="{StaticResource WindowBlur}" - WindowState="Maximized" Title="MainWindow" ResizeMode="CanResizeWithGrip" + WindowStartupLocation="CenterScreen" Name="MyWindow" DataContext="{Binding Main,Source={StaticResource Locator}}" hc:Dialog.Token="{x:Static data:MessageToken.MainWindow}" diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Styles/ToggleButtonDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/ToggleButtonDemoCtl.xaml index bc4d4ca7..aba17c7e 100644 --- a/src/Shared/HandyControlDemo_Shared/UserControl/Styles/ToggleButtonDemoCtl.xaml +++ b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/ToggleButtonDemoCtl.xaml @@ -77,23 +77,23 @@ - + - + - + - + - + - + diff --git a/src/Shared/HandyControl_Shared/Controls/ColorPicker/ColorPicker.cs b/src/Shared/HandyControl_Shared/Controls/ColorPicker/ColorPicker.cs index 1170a3f9..8f9cf4b8 100644 --- a/src/Shared/HandyControl_Shared/Controls/ColorPicker/ColorPicker.cs +++ b/src/Shared/HandyControl_Shared/Controls/ColorPicker/ColorPicker.cs @@ -453,7 +453,7 @@ namespace HandyControl.Controls var button = new Button { - Margin = new Thickness(0, 0, 12, 12), + Margin = new Thickness(6), Style = ResourceHelper.GetResource + + + \ No newline at end of file diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ButtonBaseBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ButtonBaseBaseStyle.xaml index 455f44ce..c9fcc5bf 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ButtonBaseBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ButtonBaseBaseStyle.xaml @@ -16,9 +16,6 @@ - - - \ No newline at end of file diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/CheckBoxBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/CheckBoxBaseStyle.xaml index d76c9d47..93b0c69e 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/CheckBoxBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/CheckBoxBaseStyle.xaml @@ -2,11 +2,26 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:HandyControl.Controls"> - + + - diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/RadioButtonBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/RadioButtonBaseStyle.xaml index 21d815bd..a956a666 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/RadioButtonBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/RadioButtonBaseStyle.xaml @@ -4,14 +4,26 @@ xmlns:system="clr-namespace:System;assembly=mscorlib"> + - + + - @@ -94,12 +106,11 @@ - - - - + + - @@ -162,14 +173,13 @@ - - + + \ No newline at end of file diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/RepeatButton.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/RepeatButton.xaml index 2644dc8e..11e26f97 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/RepeatButton.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/RepeatButton.xaml @@ -51,15 +51,11 @@ -