Преглед на файлове

更新添加Icon预览图

Jiangsheng преди 3 седмици
родител
ревизия
8a3e49ea33

Файловите разлики са ограничени, защото са твърде много
+ 141 - 0
Readme.md


+ 119 - 33
SKMC.UI/Assets/Brushes.xaml

@@ -1,56 +1,142 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-    <!--公共画刷,不随主题切换-->
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+    <!--  公共画刷,不随主题切换  -->
     <SolidColorBrush x:Key="Brush.MachineControls" Color="{DynamicResource Color.MachineControls}" />
-    <SolidColorBrush x:Key="Brush.Overlay2Percent" Opacity="0.02" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.Overlay3Percent" Opacity="0.03" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.Overlay5Percent" Opacity="0.05" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.Overlay6Percent" Opacity="0.06" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.Overlay7Percent" Opacity="0.07" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.Overlay8Percent" Opacity="0.08" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.Overlay12Percent" Opacity="0.12" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.Overlay17Percent" Opacity="0.17" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.Overlay24Percent" Opacity="0.24" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.Overlay48Percent" Opacity="0.5" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.DarkOverlay12Percent" Opacity="0.12" Color="{DynamicResource Color.DarkOverlay}" />
-    <SolidColorBrush x:Key="Brush.DarkOverlay80Percent" Opacity="0.8" Color="{DynamicResource Color.DarkOverlay}" />
-    <SolidColorBrush x:Key="Brush.DarkOverlay50Percent" Opacity="0.5" Color="{DynamicResource Color.DarkOverlay}" />
+    <SolidColorBrush
+        x:Key="Brush.Overlay2Percent"
+        Opacity="0.02"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.Overlay3Percent"
+        Opacity="0.03"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.Overlay5Percent"
+        Opacity="0.05"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.Overlay6Percent"
+        Opacity="0.06"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.Overlay7Percent"
+        Opacity="0.07"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.Overlay8Percent"
+        Opacity="0.08"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.Overlay12Percent"
+        Opacity="0.12"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.Overlay17Percent"
+        Opacity="0.17"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.Overlay24Percent"
+        Opacity="0.24"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.Overlay48Percent"
+        Opacity="0.5"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.DarkOverlay12Percent"
+        Opacity="0.12"
+        Color="{DynamicResource Color.DarkOverlay}" />
+    <SolidColorBrush
+        x:Key="Brush.DarkOverlay80Percent"
+        Opacity="0.8"
+        Color="{DynamicResource Color.DarkOverlay}" />
+    <SolidColorBrush
+        x:Key="Brush.DarkOverlay50Percent"
+        Opacity="0.5"
+        Color="{DynamicResource Color.DarkOverlay}" />
 
-    <SolidColorBrush x:Key="Brush.SecondaryButton" Opacity="0.12" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.SecondaryButtonMouseOver" Opacity="0.24" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.SecondaryButtonPressed" Opacity="0.08" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.SecondaryButtonDisabled" Opacity="0.03" Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.SecondaryButton"
+        Opacity="0.12"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.SecondaryButtonMouseOver"
+        Opacity="0.24"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.SecondaryButtonPressed"
+        Opacity="0.08"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.SecondaryButtonDisabled"
+        Opacity="0.03"
+        Color="{DynamicResource Color.Overlay}" />
     <SolidColorBrush x:Key="Brush.TertiaryButton" Color="Transparent" />
-    <SolidColorBrush x:Key="Brush.TertiaryButtonMouseOver" Opacity="0.24" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.TertiaryButtonPressed" Opacity="0.08" Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.TertiaryButtonMouseOver"
+        Opacity="0.24"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.TertiaryButtonPressed"
+        Opacity="0.08"
+        Color="{DynamicResource Color.Overlay}" />
     <SolidColorBrush x:Key="Brush.TertiaryButtonDisabled" Color="Transparent" />
-    <SolidColorBrush x:Key="Brush.TertiaryButtonBorder" Opacity="0.48" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.TertiaryButtonPressedBorder" Opacity="0.16" Color="{DynamicResource Color.Overlay}" />
-    <SolidColorBrush x:Key="Brush.TertiaryButtonDisabledBorder" Opacity="0.03" Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.TertiaryButtonBorder"
+        Opacity="0.48"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.TertiaryButtonPressedBorder"
+        Opacity="0.16"
+        Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.TertiaryButtonDisabledBorder"
+        Opacity="0.03"
+        Color="{DynamicResource Color.Overlay}" />
     <SolidColorBrush x:Key="Brush.SelectedBorder" Color="{DynamicResource Color.SelectedBorder}" />
     <SolidColorBrush x:Key="Brush.NotSelectedBorder" Color="{DynamicResource Color.Border}" />
     <SolidColorBrush x:Key="Brush.SelectionDisabledBackground" Color="{DynamicResource Color.SelectionDisabledBackground}" />
-    <SolidColorBrush x:Key="Brush.SelectionInactiveBorder" Opacity="0.38" Color="{DynamicResource Color.Overlay}" />
+    <SolidColorBrush
+        x:Key="Brush.SelectionInactiveBorder"
+        Opacity="0.38"
+        Color="{DynamicResource Color.Overlay}" />
     <SolidColorBrush x:Key="Brush.SelectionSelected" Color="{DynamicResource Color.Signature}" />
-    <SolidColorBrush x:Key="Brush.SelectionSelectedBackground" Opacity="0.5" Color="{DynamicResource Color.Signature}" />
+    <SolidColorBrush
+        x:Key="Brush.SelectionSelectedBackground"
+        Opacity="0.5"
+        Color="{DynamicResource Color.Signature}" />
 
     <SolidColorBrush x:Key="Brush.Label" Color="{DynamicResource Color.Label}" />
-    <SolidColorBrush x:Key="Brush.SecondaryFont" Opacity="0.6" Color="{DynamicResource Color.Text}" />
+    <SolidColorBrush
+        x:Key="Brush.SecondaryFont"
+        Opacity="0.6"
+        Color="{DynamicResource Color.Text}" />
     <SolidColorBrush x:Key="Brush.Annotation" Color="DarkViolet" />
     <SolidColorBrush x:Key="Brush.TextSecondColor" Color="Yellow" />
     <SolidColorBrush x:Key="Brush.DebugText" Color="White" />
-    <SolidColorBrush x:Key="Brush.DebugTextOver" Opacity="0.5" Color="White" />
-    
+    <SolidColorBrush
+        x:Key="Brush.DebugTextOver"
+        Opacity="0.5"
+        Color="White" />
+
     <SolidColorBrush x:Key="Brush.RgbRed" Color="{DynamicResource Color.Error}" />
     <SolidColorBrush x:Key="Brush.RgbGreen" Color="{DynamicResource Color.RgbGreen}" />
     <SolidColorBrush x:Key="Brush.RgbBlue" Color="{DynamicResource Color.RgbBlue}" />
     <SolidColorBrush x:Key="Brush.Neutral" Color="{DynamicResource Color.Neutral}" />
     <SolidColorBrush x:Key="Brush.Error" Color="{DynamicResource Color.Error}" />
-    <SolidColorBrush x:Key="Brush.ErrorLowOpacity" Opacity="0.1" Color="{DynamicResource Color.Error}" />
+    <SolidColorBrush
+        x:Key="Brush.ErrorLowOpacity"
+        Opacity="0.1"
+        Color="{DynamicResource Color.Error}" />
     <SolidColorBrush x:Key="Brush.Warning" Color="{DynamicResource Color.Warning}" />
-    <SolidColorBrush x:Key="Brush.WarningLowOpacity" Opacity="0.1" Color="{DynamicResource Color.Warning}" />
+    <SolidColorBrush
+        x:Key="Brush.WarningLowOpacity"
+        Opacity="0.1"
+        Color="{DynamicResource Color.Warning}" />
     <SolidColorBrush x:Key="Brush.Good" Color="{DynamicResource Color.Good}" />
-    <SolidColorBrush x:Key="Brush.GoodLowOpacity" Opacity="0.1" Color="{DynamicResource Color.Good}" />
+    <SolidColorBrush
+        x:Key="Brush.GoodLowOpacity"
+        Opacity="0.1"
+        Color="{DynamicResource Color.Good}" />
     <SolidColorBrush x:Key="Brush.DebugLog" Color="{DynamicResource Color.DebugLog}" />
     <SolidColorBrush x:Key="Brush.Start" Color="{DynamicResource Color.Start}" />
     <SolidColorBrush x:Key="Brush.Stop" Color="{DynamicResource Color.Stop}" />

+ 3 - 3
SKMC.UI/Assets/Colors.xaml

@@ -1,6 +1,5 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-    <!--基础颜色/公共颜色-->
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+    <!--  基础颜色/公共颜色  -->
     <Color x:Key="Color.Neutral">#545454</Color>
     <Color x:Key="Color.Error">#FF191C</Color>
     <Color x:Key="Color.Warning">#FCB000</Color>
@@ -17,6 +16,7 @@
     <Color x:Key="Color.HomePosition">#0091FF</Color>
     <Color x:Key="Color.LockDoors">#FCB000</Color>
     <Color x:Key="Color.RgbBlue">#363BFF</Color>
+    <Color x:Key="Color.DarkBlue">DarkBlue</Color>
     <Color x:Key="Color.ViewPort.Element">Green</Color>
     <Color x:Key="Color.ViewPort.SecondaryElement">LightGreen</Color>
     <Color x:Key="Color.ViewPort.SelectedElement">Blue</Color>

+ 5 - 4
SKMC.UI/Assets/Font.xaml

@@ -1,7 +1,8 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
-                    xmlns:system="clr-namespace:System;assembly=mscorlib">
-    <!--全局字体字号-->
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:system="clr-namespace:System;assembly=mscorlib">
+    <!--  全局字体字号  -->
     <FontFamily x:Key="FontFamily.Global">Arial</FontFamily>
     <system:Double x:Key="FontSize.Headline">21</system:Double>
     <system:Double x:Key="FontSize.Callout">18</system:Double>

BIN
SKMC.UI/Assets/Icon_1.png


BIN
SKMC.UI/Assets/Icon_2.png


Файловите разлики са ограничени, защото са твърде много
+ 103 - 32
SKMC.UI/Assets/Icons.xaml


+ 22 - 18
SKMC.UI/Assets/Storyboards.xaml

@@ -1,12 +1,14 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-                    xmlns:sys="clr-namespace:System;assembly=mscorlib">
-    <!--故事板-闪烁-->
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:sys="clr-namespace:System;assembly=mscorlib">
+    <!--  故事板-闪烁  -->
     <Storyboard x:Key="Storyboard.Blinking">
-        <DoubleAnimationUsingKeyFrames AutoReverse="True" 
-                                       RepeatBehavior="Forever" 
-                                       Storyboard.TargetProperty="Opacity" 
-                                       Duration="0:0:1">
+        <DoubleAnimationUsingKeyFrames
+            AutoReverse="True"
+            RepeatBehavior="Forever"
+            Storyboard.TargetProperty="Opacity"
+            Duration="0:0:1">
             <DoubleAnimationUsingKeyFrames.KeyFrames>
                 <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0.0" />
                 <DiscreteDoubleKeyFrame KeyTime="0:0:0.5" Value="1.0" />
@@ -14,11 +16,12 @@
             </DoubleAnimationUsingKeyFrames.KeyFrames>
         </DoubleAnimationUsingKeyFrames>
     </Storyboard>
-    <!--故事板-背景闪烁-->
+    <!--  故事板-背景闪烁  -->
     <Storyboard x:Key="Storyboard.BackgroundBlinking">
-        <ObjectAnimationUsingKeyFrames RepeatBehavior="Forever" 
-                                       Storyboard.TargetProperty="Background" 
-                                       Duration="0:0:2">
+        <ObjectAnimationUsingKeyFrames
+            RepeatBehavior="Forever"
+            Storyboard.TargetProperty="Background"
+            Duration="0:0:2">
             <ObjectAnimationUsingKeyFrames.KeyFrames>
                 <DiscreteObjectKeyFrame KeyTime="0:0:1">
                     <DiscreteObjectKeyFrame.Value>
@@ -28,13 +31,14 @@
             </ObjectAnimationUsingKeyFrames.KeyFrames>
         </ObjectAnimationUsingKeyFrames>
     </Storyboard>
-    
+
     <Storyboard x:Key="Storyboard.Runtime">
-        <ObjectAnimationUsingKeyFrames Duration="0:0:2"
-                                       RepeatBehavior="Forever"
-                                       Storyboard.TargetProperty="DataContext">
-            <DiscreteObjectKeyFrame Value="{x:Static sys:DateTime.Now}" KeyTime="0:0:0"/>
-            <DiscreteObjectKeyFrame Value="{x:Static sys:DateTime.Now}" KeyTime="0:0:1"/>
+        <ObjectAnimationUsingKeyFrames
+            RepeatBehavior="Forever"
+            Storyboard.TargetProperty="DataContext"
+            Duration="0:0:2">
+            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static sys:DateTime.Now}" />
+            <DiscreteObjectKeyFrame KeyTime="0:0:1" Value="{x:Static sys:DateTime.Now}" />
         </ObjectAnimationUsingKeyFrames>
     </Storyboard>
 </ResourceDictionary>

+ 10 - 9
SKMC.UI/Converters/Converters.xaml

@@ -1,10 +1,11 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-                    xmlns:c="clr-namespace:SKMC.UI.Converters">
-    <c:BooleanToCollapsedConverter x:Key="BooleanToCollapsedConverter"/>
-    <c:StringToBooleanConverter x:Key="StringToBooleanConverter"/>
-    <c:BoolToOppositeBoolConverter x:Key="BoolToOppositeBoolConverter"/>
-    <c:BooleanToInvertedBooleanConverter x:Key="BooleanToInvertedBooleanConverter"/>
-    <c:DateTimeToStringConverter x:Key="DateTimeToStringConverter"/>
-    <c:EnumDescriptionConverter x:Key="EnumDescriptionConverter"/>
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:c="clr-namespace:SKMC.UI.Converters">
+    <c:BooleanToCollapsedConverter x:Key="BooleanToCollapsedConverter" />
+    <c:StringToBooleanConverter x:Key="StringToBooleanConverter" />
+    <c:BoolToOppositeBoolConverter x:Key="BoolToOppositeBoolConverter" />
+    <c:BooleanToInvertedBooleanConverter x:Key="BooleanToInvertedBooleanConverter" />
+    <c:DateTimeToStringConverter x:Key="DateTimeToStringConverter" />
+    <c:EnumDescriptionConverter x:Key="EnumDescriptionConverter" />
 </ResourceDictionary>

+ 25 - 25
SKMC.UI/FrameWork.xaml

@@ -1,28 +1,28 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <ResourceDictionary.MergedDictionaries>
-        <!--Converters-->
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Converters/Converters.xaml"/>
-        <!--Assets-->
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Colors.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Brushes.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Font.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Icons.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Storyboards.xaml"/>
-        <!--Styles-->
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/Button.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/RadioButton.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/ScrollViewer.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/TextBox.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/ToggleButton.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/TextBlock.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/DataGrid.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/Border.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/Calendar.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/DatePicker.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/TapItem.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/ListView.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/ComboBox.xaml"/>
-        <!--Styles-->
+        <!--  Converters  -->
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Converters/Converters.xaml" />
+        <!--  Assets  -->
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Colors.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Brushes.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Font.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Icons.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Storyboards.xaml" />
+        <!--  Styles  -->
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/Button.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/RadioButton.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/ScrollViewer.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/TextBox.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/ToggleButton.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/TextBlock.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/DataGrid.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/Border.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/Calendar.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/DatePicker.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/TapItem.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/ListView.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/ComboBox.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/PasswordBox.xaml" />
+        <!--  Styles  -->
     </ResourceDictionary.MergedDictionaries>
 </ResourceDictionary>

+ 8 - 1
SKMC.UI/SKMC.UI.csproj

@@ -88,8 +88,15 @@
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
     </None>
   </ItemGroup>
-  <ItemGroup />
   <ItemGroup>
+    <Resource Include="Assets\Icon_1.png" />
+    <Resource Include="Assets\Icon_2.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <Page Include="Styles\PasswordBox.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="UserControls\NumpadControl.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>

+ 4 - 5
SKMC.UI/Styles/Border.xaml

@@ -1,8 +1,7 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <Style x:Key="Border.Base" TargetType="{x:Type Border}">
-        <Setter Property="Background" Value="{DynamicResource Brush.PreviewBackground}"/>
-        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}"/>
-        <Setter Property="BorderThickness" Value="0"/>
+        <Setter Property="Background" Value="{DynamicResource Brush.PreviewBackground}" />
+        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}" />
+        <Setter Property="BorderThickness" Value="0" />
     </Style>
 </ResourceDictionary>

+ 156 - 130
SKMC.UI/Styles/Button.xaml

@@ -1,49 +1,55 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-                    xmlns:c="clr-namespace:SKMC.UI.CustomControls">
-    <!--基础按钮-->
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:c="clr-namespace:SKMC.UI.CustomControls">
+    <!--  基础按钮  -->
     <Style x:Key="Button.Base" TargetType="{x:Type Button}">
-        <Setter Property="HorizontalContentAlignment" Value="Center"/>
-        <Setter Property="VerticalContentAlignment" Value="Center"/>
-        <Setter Property="Width" Value="160"/>
-        <Setter Property="Height" Value="45"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-        <Setter Property="Background" Value="{DynamicResource Brush.SignatureAccent}"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}"/>
-        <Setter Property="Cursor" Value="Hand"/>
-        <Setter Property="Margin" Value="2"/>
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="Width" Value="160" />
+        <Setter Property="Height" Value="45" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+        <Setter Property="Background" Value="{DynamicResource Brush.SignatureAccent}" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}" />
+        <Setter Property="Cursor" Value="Hand" />
+        <Setter Property="Margin" Value="2" />
         <Style.Triggers>
             <Trigger Property="IsMouseOver" Value="True">
-                <Setter Property="Foreground" Value="{DynamicResource Brush.Signature}"/>
+                <Setter Property="Foreground" Value="{DynamicResource Brush.Signature}" />
             </Trigger>
         </Style.Triggers>
     </Style>
-    <!--主要按钮-->
-    <Style x:Key="Button.Primary" TargetType="{x:Type Button}" BasedOn="{StaticResource Button.Base}">
-        <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButton}"/>
+    <!--  主要按钮  -->
+    <Style
+        x:Key="Button.Primary"
+        BasedOn="{StaticResource Button.Base}"
+        TargetType="{x:Type Button}">
+        <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButton}" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type Button}">
-                    <Border Background="{TemplateBinding Background}"
-                            BorderThickness="{TemplateBinding BorderThickness}"
-                            BorderBrush="{TemplateBinding BorderBrush}"
-                            Width="{TemplateBinding Width}"
-                            Height="{TemplateBinding Height}">
-                        <ContentPresenter Content="{TemplateBinding Content}"
-                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
-                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
-                                          Margin="{TemplateBinding Padding}"/>
+                    <Border
+                        Width="{TemplateBinding Width}"
+                        Height="{TemplateBinding Height}"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}">
+                        <ContentPresenter
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Content="{TemplateBinding Content}" />
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButtonPressed}"/>
+                            <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButtonPressed}" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="True">
-                            <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButtonMouseOver}"/>
+                            <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButtonMouseOver}" />
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="False">
-                            <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButtonDisabled}"/>
+                            <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButtonDisabled}" />
                             <!--<Setter Property="Foreground" Value="{DynamicResource Brush.TextInactive}"/>-->
                         </Trigger>
                     </ControlTemplate.Triggers>
@@ -51,141 +57,159 @@
             </Setter.Value>
         </Setter>
     </Style>
-    <!--次要按钮-->
-    <Style x:Key="Button.Secondary" TargetType="{x:Type Button}" BasedOn="{StaticResource Button.Base}">
-        <Setter Property="Background" Value="{DynamicResource Brush.Neutral}"/>
+    <!--  次要按钮  -->
+    <Style
+        x:Key="Button.Secondary"
+        BasedOn="{StaticResource Button.Base}"
+        TargetType="{x:Type Button}">
+        <Setter Property="Background" Value="{DynamicResource Brush.Neutral}" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type Button}">
-                    <Border Background="{TemplateBinding Background}"
-                            BorderThickness="{TemplateBinding BorderThickness}"
-                            BorderBrush="{TemplateBinding BorderBrush}">
-                        <ContentPresenter Content="{TemplateBinding Content}"
-                                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
-                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+                    <Border
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}">
+                        <ContentPresenter
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Content="{TemplateBinding Content}" />
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter Property="Background" Value="{DynamicResource Brush.Border}"/>
+                            <Setter Property="Background" Value="{DynamicResource Brush.Border}" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="True">
-                            <Setter Property="Background" Value="{DynamicResource Brush.Neutral}"/>
+                            <Setter Property="Background" Value="{DynamicResource Brush.Neutral}" />
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="False">
-                            <Setter Property="Opacity" Value="0.6"/>
+                            <Setter Property="Opacity" Value="0.6" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
     </Style>
-    <!--按钮图标带图标-->
+    <!--  按钮图标带图标  -->
     <Style x:Key="Button.WithIcon" TargetType="{x:Type c:SKButton}">
-        <Setter Property="IconSize" Value="{DynamicResource FontSize.Headline}"/>
-        <Setter Property="IconFillColor" Value="{DynamicResource Brush.Icon}"/>
-        <Setter Property="HorizontalContentAlignment" Value="Center"/>
-        <Setter Property="VerticalContentAlignment" Value="Center"/>
-        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-        <Setter Property="BorderThickness" Value="1"/>
-        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}"/>
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="Width" Value="120"/>
-        <Setter Property="Height" Value="40"/>
-        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Headline}"/>
-        <Setter Property="Cursor" Value="Hand"/>
+        <Setter Property="IconSize" Value="{DynamicResource FontSize.Headline}" />
+        <Setter Property="IconFillColor" Value="{DynamicResource Brush.Icon}" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+        <Setter Property="BorderThickness" Value="1" />
+        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}" />
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Width" Value="120" />
+        <Setter Property="Height" Value="40" />
+        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Headline}" />
+        <Setter Property="Cursor" Value="Hand" />
         <Setter Property="Template">
             <Setter.Value>
-                <ControlTemplate TargetType="{x:Type c:SKButton }">
-                    <Border x:Name="border"
-                            Background="{TemplateBinding Background}"
-                            BorderBrush="{TemplateBinding BorderBrush}"
-                            BorderThickness="{TemplateBinding BorderThickness}"
-                            CornerRadius="{TemplateBinding CornerRadius}"
-                            Width="{TemplateBinding Width}"
-                            Height="{TemplateBinding Height}"
-                            HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
-                            VerticalAlignment="{TemplateBinding VerticalAlignment}">
+                <ControlTemplate TargetType="{x:Type c:SKButton}">
+                    <Border
+                        x:Name="border"
+                        Width="{TemplateBinding Width}"
+                        Height="{TemplateBinding Height}"
+                        HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
+                        VerticalAlignment="{TemplateBinding VerticalAlignment}"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        CornerRadius="{TemplateBinding CornerRadius}">
                         <Grid>
                             <Grid.ColumnDefinitions>
-                                <ColumnDefinition Width="Auto"/>
-                                <ColumnDefinition Width="*"/>
+                                <ColumnDefinition Width="Auto" />
+                                <ColumnDefinition Width="*" />
                             </Grid.ColumnDefinitions>
-                            <Path x:Name="icon"
-                                  Data="{TemplateBinding Icon}"
-                                  Width="{TemplateBinding IconSize}"
-                                  Height="{TemplateBinding IconSize}"
-                                  Fill="{TemplateBinding IconFillColor}"
-                                  Stretch="Uniform"
-                                  HorizontalAlignment="Center"
-                                  VerticalAlignment="Center"
-                                  Margin="10 0 0 0"/>
-                            <ContentPresenter Grid.Column="1"
-                                              Content="{TemplateBinding Content}"
-                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
-                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+                            <Path
+                                x:Name="icon"
+                                Width="{TemplateBinding IconSize}"
+                                Height="{TemplateBinding IconSize}"
+                                Margin="10,0,0,0"
+                                HorizontalAlignment="Center"
+                                VerticalAlignment="Center"
+                                Data="{TemplateBinding Icon}"
+                                Fill="{TemplateBinding IconFillColor}"
+                                Stretch="Uniform" />
+                            <ContentPresenter
+                                Grid.Column="1"
+                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                                Content="{TemplateBinding Content}" />
                         </Grid>
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter Property="BorderBrush" Value="{Binding IconFillColor, RelativeSource={RelativeSource Self}}"/>
+                            <Setter Property="BorderBrush" Value="{Binding IconFillColor, RelativeSource={RelativeSource Self}}" />
                             <!--<Setter Property="Foreground" Value="{Binding IconFillColor, RelativeSource={RelativeSource Self}}"/>-->
                         </Trigger>
                         <Trigger Property="IsPressed" Value="True">
-                            <Setter Property="Background" Value="{DynamicResource Brush.ButtonPressed}"/>
+                            <Setter Property="Background" Value="{DynamicResource Brush.ButtonPressed}" />
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="False">
-                            <Setter Property="Background" Value="{DynamicResource Brush.ButtonTextDisabled}"/>
-                            <Setter Property="BorderBrush" Value="{DynamicResource Brush.ButtonTextInactive}"/>
+                            <Setter Property="Background" Value="{DynamicResource Brush.ButtonTextDisabled}" />
+                            <Setter Property="BorderBrush" Value="{DynamicResource Brush.ButtonTextInactive}" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
     </Style>
-    <!--调试按钮-->
-    <Style x:Key="Button.Debug" TargetType="{x:Type Button}" BasedOn="{StaticResource Button.Base}">
-        <Setter Property="Foreground" Value="{DynamicResource Brush.DebugText}"/>
+    <!--  调试按钮  -->
+    <Style
+        x:Key="Button.Debug"
+        BasedOn="{StaticResource Button.Base}"
+        TargetType="{x:Type Button}">
+        <Setter Property="Foreground" Value="{DynamicResource Brush.DebugText}" />
         <Style.Triggers>
             <Trigger Property="IsMouseOver" Value="True">
-                <Setter Property="Foreground" Value="{DynamicResource Brush.DebugTextOver}"/>
+                <Setter Property="Foreground" Value="{DynamicResource Brush.DebugTextOver}" />
             </Trigger>
         </Style.Triggers>
     </Style>
-    <!--窗体控制按钮-最大化/最小化-->
+    <!--  窗体控制按钮-最大化/最小化  -->
     <Style x:Key="Button.WindowControl" TargetType="{x:Type Button}">
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-        <Setter Property="Cursor" Value="Hand"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="Height" Value="25"/>
-        <Setter Property="Width" Value="25"/>
-        <Setter Property="Padding" Value="5"/>
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+        <Setter Property="Cursor" Value="Hand" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Height" Value="25" />
+        <Setter Property="Width" Value="25" />
+        <Setter Property="Padding" Value="5" />
         <!--<Setter Property="Margin" Value="5"/>-->
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type Button}">
-                    <Border Name="bd" CornerRadius="5" Background="{TemplateBinding Background}" 
-                            BorderThickness="{TemplateBinding BorderThickness}">
-                        <Path Name="ico" Data="{TemplateBinding Content}" 
-                              Fill="{TemplateBinding Foreground}" 
-                              Height="15" Width="15" Stretch="Uniform" 
-                              Margin="{TemplateBinding Padding}"/>
+                    <Border
+                        Name="bd"
+                        Background="{TemplateBinding Background}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        CornerRadius="5">
+                        <Path
+                            Name="ico"
+                            Width="15"
+                            Height="15"
+                            Margin="{TemplateBinding Padding}"
+                            Data="{TemplateBinding Content}"
+                            Fill="{TemplateBinding Foreground}"
+                            Stretch="Uniform" />
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter Property="Background" Value="{DynamicResource Brush.ButtonHover}"/>
+                            <Setter Property="Background" Value="{DynamicResource Brush.ButtonHover}" />
                         </Trigger>
                         <MultiTrigger>
                             <MultiTrigger.Conditions>
-                                <Condition Property="IsMouseOver" Value="True"/>
-                                <Condition Property="Tag" Value="IsCloseButton"/>
+                                <Condition Property="IsMouseOver" Value="True" />
+                                <Condition Property="Tag" Value="IsCloseButton" />
                             </MultiTrigger.Conditions>
-                            <Setter Property="Background" Value="#F72626"/>
-                            <Setter TargetName="ico" Property="Fill" Value="{DynamicResource Brush.ButtonHover}"/>
+                            <Setter Property="Background" Value="#F72626" />
+                            <Setter TargetName="ico" Property="Fill" Value="{DynamicResource Brush.ButtonHover}" />
                         </MultiTrigger>
                         <Trigger Property="IsPressed" Value="True">
-                            <Setter TargetName="ico" Property="Fill" Value="{DynamicResource Brush.ButtonPressed}"/>
+                            <Setter TargetName="ico" Property="Fill" Value="{DynamicResource Brush.ButtonPressed}" />
                         </Trigger>
                         <!--<Trigger Property="IsMouseOver" Value="True">
                             <Setter TargetName="bd" Property="Background" Value="{DynamicResource TertiaryBackgroundColor}"></Setter>
@@ -196,29 +220,31 @@
         </Setter>
     </Style>
     <Style x:Key="Button.SimpleIcon" TargetType="{x:Type Button}">
-        <Setter Property="HorizontalContentAlignment" Value="Center"/>
-        <Setter Property="VerticalContentAlignment" Value="Center"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-        <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButton}"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}"/>
-        <Setter Property="Cursor" Value="Hand"/>
-        <Setter Property="Margin" Value="2"/>
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+        <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButton}" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}" />
+        <Setter Property="Cursor" Value="Hand" />
+        <Setter Property="Margin" Value="2" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type Button}">
-                    <Border Width="{TemplateBinding Width}"
-                            Height="{TemplateBinding Height}"
-                            Background="{TemplateBinding Background}"
-                            BorderThickness="{TemplateBinding BorderThickness}">
-                        <Path Data="{TemplateBinding Content}"
-                              Stroke="{TemplateBinding Foreground}"
-                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
-                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
-                              Width="{TemplateBinding FontSize}"
-                              Height="{TemplateBinding FontSize}"
-                              Margin="{TemplateBinding Padding}"
-                              Stretch="Uniform"/>
+                    <Border
+                        Width="{TemplateBinding Width}"
+                        Height="{TemplateBinding Height}"
+                        Background="{TemplateBinding Background}"
+                        BorderThickness="{TemplateBinding BorderThickness}">
+                        <Path
+                            Width="{TemplateBinding FontSize}"
+                            Height="{TemplateBinding FontSize}"
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Data="{TemplateBinding Content}"
+                            Stretch="Uniform"
+                            Stroke="{TemplateBinding Foreground}" />
                     </Border>
 
                 </ControlTemplate>
@@ -226,7 +252,7 @@
         </Setter>
         <Style.Triggers>
             <Trigger Property="IsMouseOver" Value="True">
-                <Setter Property="Background" Value="{DynamicResource Brush.Signature}"/>
+                <Setter Property="Background" Value="{DynamicResource Brush.Signature}" />
             </Trigger>
         </Style.Triggers>
     </Style>

+ 194 - 134
SKMC.UI/Styles/Calendar.xaml

@@ -1,9 +1,8 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <ResourceDictionary.MergedDictionaries>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Icons.xaml"/>
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Icons.xaml" />
     </ResourceDictionary.MergedDictionaries>
-    <!--年-->
+    <!--    -->
     <Style x:Key="Calendar.CalendarButton" TargetType="{x:Type CalendarButton}">
         <Setter Property="Background" Value="{DynamicResource Brush.SignatureAccent}" />
         <Setter Property="FontSize" Value="15" />
@@ -13,30 +12,34 @@
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type CalendarButton}">
                     <Grid>
-                        <Rectangle Name="SelectedBackground" 
-                                   Fill="{TemplateBinding Control.Background}" 
-                                   Opacity="0" 
-                                   RadiusX="26" 
-                                   RadiusY="26" />
-                        <Rectangle Name="Background" 
-                                   Fill="{TemplateBinding Control.Background}" 
-                                   Opacity="0" 
-                                   RadiusX="26" 
-                                   RadiusY="26" />
-                        <ContentPresenter Name="NormalText" Margin="1,0,1,1" 
-                                          HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" 
-                                          VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" 
-                                          TextElement.Foreground="#FFFFFF" />
+                        <Rectangle
+                            Name="SelectedBackground"
+                            Fill="{TemplateBinding Control.Background}"
+                            Opacity="0"
+                            RadiusX="26"
+                            RadiusY="26" />
+                        <Rectangle
+                            Name="Background"
+                            Fill="{TemplateBinding Control.Background}"
+                            Opacity="0"
+                            RadiusX="26"
+                            RadiusY="26" />
+                        <ContentPresenter
+                            Name="NormalText"
+                            Margin="1,0,1,1"
+                            HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
+                            TextElement.Foreground="#FFFFFF" />
                     </Grid>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter TargetName="Background" Property="Opacity" Value="0.5"/>
+                            <Setter TargetName="Background" Property="Opacity" Value="0.5" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="True">
-                            <Setter TargetName="Background" Property="Opacity" Value="0.5"/>
+                            <Setter TargetName="Background" Property="Opacity" Value="0.5" />
                         </Trigger>
                         <Trigger Property="IsInactive" Value="True">
-                            <Setter TargetName="NormalText" Property="TextElement.Foreground" Value="#FF777777"/>
+                            <Setter TargetName="NormalText" Property="TextElement.Foreground" Value="#FF777777" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
@@ -45,8 +48,11 @@
         <Setter Property="VerticalContentAlignment" Value="Center" />
         <Setter Property="Width" Value="80" />
     </Style>
-    <Style x:Key="{x:Type CalendarButton}" BasedOn="{StaticResource Calendar.CalendarButton}" TargetType="{x:Type CalendarButton}" />
-    <!--天-->
+    <Style
+        x:Key="{x:Type CalendarButton}"
+        BasedOn="{StaticResource Calendar.CalendarButton}"
+        TargetType="{x:Type CalendarButton}" />
+    <!--  天  -->
     <Style x:Key="Calendar.DayButton" TargetType="{x:Type CalendarDayButton}">
         <Setter Property="FontFamily" Value="Arial" />
         <Setter Property="FontSize" Value="13" />
@@ -56,52 +62,62 @@
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type CalendarDayButton}">
                     <Grid>
-                        <Ellipse Name="TodayBackground" Opacity="0" 
-                                 Fill="{DynamicResource Brush.Overlay12Percent}" />
-                        <Ellipse Name="SelectedBackground" 
-                                 Fill="{DynamicResource Brush.SignatureAccent}" 
-                                 Opacity="0" />
-                        <Border Background="{TemplateBinding Control.Background}" 
-                                BorderBrush="{TemplateBinding Control.BorderBrush}" 
-                                BorderThickness="{TemplateBinding Control.BorderThickness}" />
-                        <Ellipse Name="HighlightBackground" 
-                                 Fill="{DynamicResource Brush.SignatureAccent}" 
-                                 Opacity="0" />
-                        <ContentPresenter Name="NormalText" Margin="5,1,5,1" 
-                                          HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" 
-                                          VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" 
-                                          TextElement.Foreground="#FFFFFF" />
-                        <Path Name="Blackout" Margin="3" 
-                              HorizontalAlignment="Stretch" 
-                              VerticalAlignment="Stretch" 
-                              Data="M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364" 
-                              Fill="#FF000000" Opacity="0" 
-                              RenderTransformOrigin="0.5,0.5" 
-                              Stretch="Fill" />
+                        <Ellipse
+                            Name="TodayBackground"
+                            Fill="{DynamicResource Brush.Overlay12Percent}"
+                            Opacity="0" />
+                        <Ellipse
+                            Name="SelectedBackground"
+                            Fill="{DynamicResource Brush.SignatureAccent}"
+                            Opacity="0" />
+                        <Border
+                            Background="{TemplateBinding Control.Background}"
+                            BorderBrush="{TemplateBinding Control.BorderBrush}"
+                            BorderThickness="{TemplateBinding Control.BorderThickness}" />
+                        <Ellipse
+                            Name="HighlightBackground"
+                            Fill="{DynamicResource Brush.SignatureAccent}"
+                            Opacity="0" />
+                        <ContentPresenter
+                            Name="NormalText"
+                            Margin="5,1,5,1"
+                            HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
+                            TextElement.Foreground="#FFFFFF" />
+                        <Path
+                            Name="Blackout"
+                            Margin="3"
+                            HorizontalAlignment="Stretch"
+                            VerticalAlignment="Stretch"
+                            Data="M8.1772461,11.029181 L10.433105,11.029181 L11.700684,12.801641 L12.973633,11.029181 L15.191895,11.029181 L12.844727,13.999395 L15.21875,17.060919 L12.962891,17.060919 L11.673828,15.256231 L10.352539,17.060919 L8.1396484,17.060919 L10.519043,14.042364"
+                            Fill="#FF000000"
+                            Opacity="0"
+                            RenderTransformOrigin="0.5,0.5"
+                            Stretch="Fill" />
                     </Grid>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsEnabled" Value="False">
-                            <Setter TargetName="HighlightBackground" Property="Opacity" Value="0"/>
-                            <Setter TargetName="NormalText" Property="Opacity" Value="0.35"/>
+                            <Setter TargetName="HighlightBackground" Property="Opacity" Value="0" />
+                            <Setter TargetName="NormalText" Property="Opacity" Value="0.35" />
                         </Trigger>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter TargetName="HighlightBackground" Property="Opacity" Value="0.5"/>
+                            <Setter TargetName="HighlightBackground" Property="Opacity" Value="0.5" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="True">
-                            <Setter TargetName="HighlightBackground" Property="Opacity" Value="0.5"/>
+                            <Setter TargetName="HighlightBackground" Property="Opacity" Value="0.5" />
                         </Trigger>
                         <Trigger Property="IsSelected" Value="True">
-                            <Setter TargetName="SelectedBackground" Property="Opacity" Value="0.75"/>
+                            <Setter TargetName="SelectedBackground" Property="Opacity" Value="0.75" />
                         </Trigger>
                         <Trigger Property="IsInactive" Value="True">
-                            <Setter TargetName="NormalText" Property="TextElement.Foreground" Value="#FFFFFFFF"/>
+                            <Setter TargetName="NormalText" Property="TextElement.Foreground" Value="#FFFFFFFF" />
                         </Trigger>
                         <Trigger Property="IsToday" Value="True">
-                            <Setter TargetName="TodayBackground" Property="Opacity" Value="1"/>
-                            <Setter TargetName="NormalText" Property="TextElement.Foreground" Value="#FFFFFFFF"/>
+                            <Setter TargetName="TodayBackground" Property="Opacity" Value="1" />
+                            <Setter TargetName="NormalText" Property="TextElement.Foreground" Value="#FFFFFFFF" />
                         </Trigger>
                         <Trigger Property="IsBlackedOut" Value="True">
-                            <Setter TargetName="Blackout" Property="Opacity" Value="0.2"/>
+                            <Setter TargetName="Blackout" Property="Opacity" Value="0.2" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
@@ -110,7 +126,10 @@
         <Setter Property="VerticalContentAlignment" Value="Center" />
         <Setter Property="Width" Value="48" />
     </Style>
-    <Style x:Key="{x:Type CalendarDayButton}" BasedOn="{StaticResource Calendar.DayButton}" TargetType="{x:Type CalendarDayButton}" />
+    <Style
+        x:Key="{x:Type CalendarDayButton}"
+        BasedOn="{StaticResource Calendar.DayButton}"
+        TargetType="{x:Type CalendarDayButton}" />
 
     <Style x:Key="Calendar.Item" TargetType="{x:Type CalendarItem}">
         <Setter Property="Height" Value="400" />
@@ -121,11 +140,14 @@
                     <FrameworkTemplate.Resources>
                         <ResourceDictionary>
                             <DataTemplate x:Key="{x:Static CalendarItem.DayTitleTemplateResourceKey}">
-                                <TextBlock Margin="0,6,0,6" HorizontalAlignment="Center" VerticalAlignment="Center" 
-                                           FontFamily="Arial" 
-                                           FontSize="16" 
-                                           Foreground="#FFFFFF" 
-                                           Text="{Binding}" />
+                                <TextBlock
+                                    Margin="0,6,0,6"
+                                    HorizontalAlignment="Center"
+                                    VerticalAlignment="Center"
+                                    FontFamily="Arial"
+                                    FontSize="16"
+                                    Foreground="#FFFFFF"
+                                    Text="{Binding}" />
                             </DataTemplate>
                         </ResourceDictionary>
                     </FrameworkTemplate.Resources>
@@ -135,21 +157,24 @@
                                 <SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF" />
                             </ResourceDictionary>
                         </FrameworkElement.Resources>
-                        <Border Padding="5" Background="{TemplateBinding Control.Background}" 
-                                BorderBrush="{TemplateBinding Control.BorderBrush}" 
-                                BorderThickness="{TemplateBinding Control.BorderThickness}">
+                        <Border
+                            Padding="5"
+                            Background="{TemplateBinding Control.Background}"
+                            BorderBrush="{TemplateBinding Control.BorderBrush}"
+                            BorderThickness="{TemplateBinding Control.BorderThickness}">
                             <Grid>
                                 <FrameworkElement.Resources>
                                     <ResourceDictionary>
                                         <ControlTemplate x:Key="HeaderButtonTemplate" TargetType="{x:Type Button}">
                                             <Grid Cursor="Hand">
-                                                <ContentPresenter Name="buttonContent" 
-                                                                  Margin="1,4,1,9" 
-                                                                  HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" 
-                                                                  VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" 
-                                                                  Content="{TemplateBinding ContentControl.Content}" 
-                                                                  ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" 
-                                                                  TextElement.Foreground="#FFFFFF" />
+                                                <ContentPresenter
+                                                    Name="buttonContent"
+                                                    Margin="1,4,1,9"
+                                                    HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
+                                                    VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
+                                                    Content="{TemplateBinding ContentControl.Content}"
+                                                    ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
+                                                    TextElement.Foreground="#FFFFFF" />
                                             </Grid>
                                             <ControlTemplate.Triggers>
                                                 <Trigger Property="IsMouseOver" Value="True">
@@ -174,85 +199,99 @@
                                     <RowDefinition Height="Auto" />
                                     <RowDefinition Height="*" />
                                 </Grid.RowDefinitions>
-                                <Button x:Name="PART_PreviousButton" 
-                                        Grid.Row="0" 
-                                        Grid.Column="0" 
-                                        HorizontalAlignment="Left"
-                                        Background="Transparent">
-                                    <Path Width="16" Height="16" StrokeThickness="2" 
-                                          Data="{StaticResource Icon.ChevronLeft}"
-                                          Stretch="Uniform"
-                                          Stroke="#FFFFFF"/>
+                                <Button
+                                    x:Name="PART_PreviousButton"
+                                    Grid.Row="0"
+                                    Grid.Column="0"
+                                    HorizontalAlignment="Left"
+                                    Background="Transparent">
+                                    <Path
+                                        Width="16"
+                                        Height="16"
+                                        Data="{StaticResource Icon.ChevronLeft}"
+                                        Stretch="Uniform"
+                                        Stroke="#FFFFFF"
+                                        StrokeThickness="2" />
                                     <Button.Style>
                                         <Style TargetType="{x:Type Button}">
-                                            <Setter Property="Width" Value="48"/>
-                                            <Setter Property="Height" Value="48"/>
-                                            <Setter Property="HorizontalAlignment" Value="Left"/>
-                                            <Setter Property="VerticalAlignment" Value="Center"/>
-                                            <Setter Property="Focusable" Value="False"/>
-                                            <Setter Property="Foreground" Value="#FFFFFF"/>
-                                            <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButton}"/>
-                                            <Setter Property="BorderThickness" Value="0"/>
-                                            <Setter Property="Cursor" Value="Hand"/>
+                                            <Setter Property="Width" Value="48" />
+                                            <Setter Property="Height" Value="48" />
+                                            <Setter Property="HorizontalAlignment" Value="Left" />
+                                            <Setter Property="VerticalAlignment" Value="Center" />
+                                            <Setter Property="Focusable" Value="False" />
+                                            <Setter Property="Foreground" Value="#FFFFFF" />
+                                            <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButton}" />
+                                            <Setter Property="BorderThickness" Value="0" />
+                                            <Setter Property="Cursor" Value="Hand" />
                                             <Style.Triggers>
                                                 <Trigger Property="IsEnabled" Value="False">
-                                                    <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonDisabled}"/>
+                                                    <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonDisabled}" />
                                                 </Trigger>
                                                 <Trigger Property="IsMouseOver" Value="True">
-                                                    <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonMouseOver}"/>
+                                                    <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonMouseOver}" />
                                                 </Trigger>
                                                 <Trigger Property="IsPressed" Value="True">
-                                                    <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonPressed}"/>
+                                                    <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonPressed}" />
                                                 </Trigger>
                                             </Style.Triggers>
                                         </Style>
                                     </Button.Style>
                                 </Button>
-                                <Button Name="PART_HeaderButton"
-                                        Grid.Row="0"
-                                        Grid.Column="1" 
-                                        HorizontalAlignment="Center"
-                                        VerticalAlignment="Center" 
-                                        Focusable="False" 
-                                        FontWeight="Bold" 
-                                        FontFamily="Arial" 
-                                        FontSize="16" 
-                                        Template="{StaticResource HeaderButtonTemplate}" />
-                                <Button x:Name="PART_NextButton" 
-                                        Grid.Row="0" 
-                                        Grid.Column="2"
-                                        Background="Transparent">
-                                    <Path Width="16" Height="16" 
-                                          StrokeThickness="2" 
-                                          Data="{StaticResource Icon.ChevronRight}"
-                                          Stroke="#FFFFFF"
-                                          Stretch="Uniform"/>
+                                <Button
+                                    Name="PART_HeaderButton"
+                                    Grid.Row="0"
+                                    Grid.Column="1"
+                                    HorizontalAlignment="Center"
+                                    VerticalAlignment="Center"
+                                    Focusable="False"
+                                    FontFamily="Arial"
+                                    FontSize="16"
+                                    FontWeight="Bold"
+                                    Template="{StaticResource HeaderButtonTemplate}" />
+                                <Button
+                                    x:Name="PART_NextButton"
+                                    Grid.Row="0"
+                                    Grid.Column="2"
+                                    Background="Transparent">
+                                    <Path
+                                        Width="16"
+                                        Height="16"
+                                        Data="{StaticResource Icon.ChevronRight}"
+                                        Stretch="Uniform"
+                                        Stroke="#FFFFFF"
+                                        StrokeThickness="2" />
                                     <Button.Style>
                                         <Style TargetType="{x:Type Button}">
-                                            <Setter Property="Width" Value="48"/>
-                                            <Setter Property="Height" Value="48"/>
-                                            <Setter Property="HorizontalAlignment" Value="Right"/>
-                                            <Setter Property="VerticalAlignment" Value="Center"/>
-                                            <Setter Property="Focusable" Value="False"/>
-                                            <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-                                            <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButton}"/>
-                                            <Setter Property="BorderThickness" Value="0"/>
-                                            <Setter Property="Cursor" Value="Hand"/>
+                                            <Setter Property="Width" Value="48" />
+                                            <Setter Property="Height" Value="48" />
+                                            <Setter Property="HorizontalAlignment" Value="Right" />
+                                            <Setter Property="VerticalAlignment" Value="Center" />
+                                            <Setter Property="Focusable" Value="False" />
+                                            <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+                                            <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButton}" />
+                                            <Setter Property="BorderThickness" Value="0" />
+                                            <Setter Property="Cursor" Value="Hand" />
                                             <Style.Triggers>
                                                 <Trigger Property="IsEnabled" Value="False">
-                                                    <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonDisabled}"/>
+                                                    <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonDisabled}" />
                                                 </Trigger>
                                                 <Trigger Property="IsMouseOver" Value="True">
-                                                    <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonMouseOver}"/>
+                                                    <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonMouseOver}" />
                                                 </Trigger>
                                                 <Trigger Property="IsPressed" Value="True">
-                                                    <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonPressed}"/>
+                                                    <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonPressed}" />
                                                 </Trigger>
                                             </Style.Triggers>
                                         </Style>
                                     </Button.Style>
                                 </Button>
-                                <Grid Name="PART_MonthView" Row="1" ColumnSpan="3" Margin="6,-1,6,6" HorizontalAlignment="Center" Visibility="Visible">
+                                <Grid
+                                    Name="PART_MonthView"
+                                    Margin="6,-1,6,6"
+                                    HorizontalAlignment="Center"
+                                    ColumnSpan="3"
+                                    Row="1"
+                                    Visibility="Visible">
                                     <Grid.ColumnDefinitions>
                                         <ColumnDefinition Width="*" />
                                         <ColumnDefinition Width="*" />
@@ -272,7 +311,13 @@
                                         <RowDefinition Height="*" />
                                     </Grid.RowDefinitions>
                                 </Grid>
-                                <Grid Name="PART_YearView" Row="1" ColumnSpan="3" Margin="6,-3,7,6" HorizontalAlignment="Center" Visibility="Hidden">
+                                <Grid
+                                    Name="PART_YearView"
+                                    Margin="6,-3,7,6"
+                                    HorizontalAlignment="Center"
+                                    ColumnSpan="3"
+                                    Row="1"
+                                    Visibility="Hidden">
                                     <Grid.ColumnDefinitions>
                                         <ColumnDefinition Width="*" />
                                         <ColumnDefinition Width="*" />
@@ -287,17 +332,26 @@
                                 </Grid>
                             </Grid>
                         </Border>
-                        <Rectangle Name="PART_DisabledVisual" Opacity="0" RadiusX="2" RadiusY="2" Stretch="Fill" StrokeThickness="1" Visibility="Collapsed" 
-                                   Fill="{DynamicResource DisabledColor}" 
-                                   Stroke="{DynamicResource DisabledColor}"/>
+                        <Rectangle
+                            Name="PART_DisabledVisual"
+                            Fill="{DynamicResource DisabledColor}"
+                            Opacity="0"
+                            RadiusX="2"
+                            RadiusY="2"
+                            Stretch="Fill"
+                            Stroke="{DynamicResource DisabledColor}"
+                            StrokeThickness="1"
+                            Visibility="Collapsed" />
                         <VisualStateManager.VisualStateGroups>
                             <VisualStateGroup x:Name="CommonStates">
                                 <VisualState x:Name="Normal" />
                                 <VisualState x:Name="Disabled">
                                     <Storyboard>
-                                        <DoubleAnimation Storyboard.TargetName="PART_DisabledVisual" 
-                                                         Storyboard.TargetProperty="Opacity" 
-                                                         To="1" Duration="0" />
+                                        <DoubleAnimation
+                                            Storyboard.TargetName="PART_DisabledVisual"
+                                            Storyboard.TargetProperty="Opacity"
+                                            To="1"
+                                            Duration="0" />
                                     </Storyboard>
                                 </VisualState>
                             </VisualStateGroup>
@@ -307,11 +361,11 @@
                         <Trigger Property="IsEnabled" Value="False">
                             <Setter TargetName="PART_DisabledVisual" Property="Visibility" Value="Visible" />
                         </Trigger>
-                        <DataTrigger Value="Year" Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}">
+                        <DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Year">
                             <Setter TargetName="PART_MonthView" Property="Visibility" Value="Hidden" />
                             <Setter TargetName="PART_YearView" Property="Visibility" Value="Visible" />
                         </DataTrigger>
-                        <DataTrigger Value="Decade" Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}">
+                        <DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Decade">
                             <Setter TargetName="PART_MonthView" Property="Visibility" Value="Hidden" />
                             <Setter TargetName="PART_YearView" Property="Visibility" Value="Visible" />
                         </DataTrigger>
@@ -321,7 +375,10 @@
         </Setter>
         <Setter Property="Width" Value="400" />
     </Style>
-    <Style x:Key="{x:Type CalendarItem}" BasedOn="{StaticResource Calendar.Item}" TargetType="{x:Type CalendarItem}" />
+    <Style
+        x:Key="{x:Type CalendarItem}"
+        BasedOn="{StaticResource Calendar.Item}"
+        TargetType="{x:Type CalendarItem}" />
 
     <Style x:Key="Calendar.Primary" TargetType="{x:Type Calendar}">
         <Setter Property="Background" Value="#161616" />
@@ -337,6 +394,9 @@
             </Setter.Value>
         </Setter>
     </Style>
-    <Style x:Key="{x:Type Calendar}" BasedOn="{StaticResource Calendar.Primary}" TargetType="{x:Type Calendar}" />
+    <Style
+        x:Key="{x:Type Calendar}"
+        BasedOn="{StaticResource Calendar.Primary}"
+        TargetType="{x:Type Calendar}" />
 
 </ResourceDictionary>

+ 124 - 104
SKMC.UI/Styles/ComboBox.xaml

@@ -1,160 +1,180 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-                    xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
-    <!--下拉框样式-->
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
+    <!--  下拉框样式  -->
     <Style x:Key="ComboBox.FocusVisual">
         <Setter Property="Control.Template">
             <Setter.Value>
                 <ControlTemplate>
-                    <Rectangle Margin="2" StrokeDashArray="1 2" 
-                               Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" 
-                               SnapsToDevicePixels="true" 
-                               StrokeThickness="1"/>
+                    <Rectangle
+                        Margin="2"
+                        SnapsToDevicePixels="true"
+                        Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
+                        StrokeDashArray="1 2"
+                        StrokeThickness="1" />
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
     </Style>
-    <!--下拉框Toggle按钮-->
+    <!--  下拉框Toggle按钮  -->
     <Style x:Key="ComboBox.ToggleButton" TargetType="{x:Type ToggleButton}">
-        <Setter Property="OverridesDefaultStyle" Value="true"/>
-        <Setter Property="IsTabStop" Value="false"/>
-        <Setter Property="Focusable" Value="false"/>
-        <Setter Property="ClickMode" Value="Press"/>
+        <Setter Property="OverridesDefaultStyle" Value="true" />
+        <Setter Property="IsTabStop" Value="false" />
+        <Setter Property="Focusable" Value="false" />
+        <Setter Property="ClickMode" Value="Press" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type ToggleButton}">
-                    <Border x:Name="templateRoot" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
-                        <Border x:Name="splitBorder"
-                                BorderThickness="1" 
-                                HorizontalAlignment="Right" 
-                                Margin="0" SnapsToDevicePixels="true" 
-                                Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
-                            <Path x:Name="arrow" 
-                                  Data="{DynamicResource Icon.CaretDown}" 
-                                  Fill="{DynamicResource Brush.Icon}" 
-                                  Stretch="Uniform"
-                                  HorizontalAlignment="Center"
-                                  VerticalAlignment="Center"
-                                  Margin="2"/>
+                    <Border
+                        x:Name="templateRoot"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        SnapsToDevicePixels="true">
+                        <Border
+                            x:Name="splitBorder"
+                            Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"
+                            Margin="0"
+                            HorizontalAlignment="Right"
+                            BorderThickness="1"
+                            SnapsToDevicePixels="true">
+                            <Path
+                                x:Name="arrow"
+                                Margin="2"
+                                HorizontalAlignment="Center"
+                                VerticalAlignment="Center"
+                                Data="{DynamicResource Icon.CaretDown}"
+                                Fill="{DynamicResource Brush.Icon}"
+                                Stretch="Uniform" />
                         </Border>
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="true">
-                            <Setter TargetName="arrow" Property="Fill"  Value="{DynamicResource Brush.IconInactive}"/>
+                            <Setter TargetName="arrow" Property="Fill" Value="{DynamicResource Brush.IconInactive}" />
                             <!--<Setter TargetName="templateRoot" Property="Background"  Value="{DynamicResource Brush.Background}"/>-->
-                            <Setter TargetName="templateRoot" Property="BorderBrush" Value="{DynamicResource Brush.Signature}"/>
+                            <Setter TargetName="templateRoot" Property="BorderBrush" Value="{DynamicResource Brush.Signature}" />
                             <!--<Setter TargetName="splitBorder" Property="BorderBrush" Value="{DynamicResource Brush.SignatureDark}"/>-->
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="false">
-                            <Setter Property="Fill" TargetName="arrow" Value="{DynamicResource Brush.ButtonTextDisabled}"/>
+                            <Setter TargetName="arrow" Property="Fill" Value="{DynamicResource Brush.ButtonTextDisabled}" />
                         </Trigger>
                         <Trigger Property="IsChecked" Value="True">
-                            <Setter TargetName="arrow" Property="Data" Value="{DynamicResource Icon.CaretUp}"/>
+                            <Setter TargetName="arrow" Property="Data" Value="{DynamicResource Icon.CaretUp}" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
     </Style>
-    <!--下拉框控件模板-->
+    <!--  下拉框控件模板  -->
     <ControlTemplate x:Key="ComboBox.Template" TargetType="{x:Type ComboBox}">
         <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
             <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="*"/>
-                <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" 
-                                  Width="0"/>
+                <ColumnDefinition Width="*" />
+                <ColumnDefinition Width="0" MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" />
             </Grid.ColumnDefinitions>
-            <Popup x:Name="PART_Popup" 
-                   AllowsTransparency="true"
-                   IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource Mode=TemplatedParent}}" 
-                   Margin="1" Placement="Bottom" 
-                   PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
-                <theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
-                    <Border x:Name="dropDownBorder" 
-                            Background="{DynamicResource Brush.DarkBackground}" 
-                            BorderBrush="{DynamicResource Brush.Border}" 
-                            BorderThickness="1">
-                        <ScrollViewer x:Name="DropDownScrollViewer" 
-                                    Style="{DynamicResource ScrollViewer.Default}">
+            <Popup
+                x:Name="PART_Popup"
+                Margin="1"
+                AllowsTransparency="true"
+                IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource Mode=TemplatedParent}}"
+                Placement="Bottom"
+                PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
+                <theme:SystemDropShadowChrome
+                    x:Name="shadow"
+                    MinWidth="{Binding ActualWidth, ElementName=templateRoot}"
+                    MaxHeight="{TemplateBinding MaxDropDownHeight}"
+                    Color="Transparent">
+                    <Border
+                        x:Name="dropDownBorder"
+                        Background="{DynamicResource Brush.DarkBackground}"
+                        BorderBrush="{DynamicResource Brush.Border}"
+                        BorderThickness="1">
+                        <ScrollViewer x:Name="DropDownScrollViewer" Style="{DynamicResource ScrollViewer.Default}">
                             <Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
-                                <Canvas x:Name="canvas" 
-                                        HorizontalAlignment="Left" 
-                                        Height="0" 
-                                        VerticalAlignment="Top" 
-                                        Width="0">
-                                    <Rectangle x:Name="opaqueRect" 
-                                               Fill="{Binding Background, ElementName=dropDownBorder}" 
-                                               Height="{Binding ActualHeight, ElementName=dropDownBorder}" 
-                                               Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
+                                <Canvas
+                                    x:Name="canvas"
+                                    Width="0"
+                                    Height="0"
+                                    HorizontalAlignment="Left"
+                                    VerticalAlignment="Top">
+                                    <Rectangle
+                                        x:Name="opaqueRect"
+                                        Width="{Binding ActualWidth, ElementName=dropDownBorder}"
+                                        Height="{Binding ActualHeight, ElementName=dropDownBorder}"
+                                        Fill="{Binding Background, ElementName=dropDownBorder}" />
                                 </Canvas>
-                                <ItemsPresenter x:Name="ItemsPresenter" 
-                                                KeyboardNavigation.DirectionalNavigation="Contained" 
-                                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
+                                <ItemsPresenter
+                                    x:Name="ItemsPresenter"
+                                    KeyboardNavigation.DirectionalNavigation="Contained"
+                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                             </Grid>
                         </ScrollViewer>
                     </Border>
                 </theme:SystemDropShadowChrome>
             </Popup>
-            <ToggleButton x:Name="toggleButton" 
-                          Background="{TemplateBinding Background}" 
-                          BorderBrush="{TemplateBinding BorderBrush}" 
-                          BorderThickness="{TemplateBinding BorderThickness}" 
-                          Grid.ColumnSpan="2" 
-                          IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource Mode=TemplatedParent}}" 
-                          Style="{StaticResource ComboBox.ToggleButton}"/>
-            <ContentPresenter x:Name="contentPresenter" 
-                              ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" 
-                              ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" 
-                              Content="{TemplateBinding SelectionBoxItem}" 
-                              ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" 
-                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
-                              IsHitTestVisible="false" Margin="{TemplateBinding Padding}" 
-                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" 
-                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+            <ToggleButton
+                x:Name="toggleButton"
+                Grid.ColumnSpan="2"
+                Background="{TemplateBinding Background}"
+                BorderBrush="{TemplateBinding BorderBrush}"
+                BorderThickness="{TemplateBinding BorderThickness}"
+                IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource Mode=TemplatedParent}}"
+                Style="{StaticResource ComboBox.ToggleButton}" />
+            <ContentPresenter
+                x:Name="contentPresenter"
+                Margin="{TemplateBinding Padding}"
+                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                Content="{TemplateBinding SelectionBoxItem}"
+                ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
+                ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
+                ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
+                IsHitTestVisible="false"
+                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
         </Grid>
         <ControlTemplate.Triggers>
-            <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
-                <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
-                <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
+            <Trigger SourceName="PART_Popup" Property="HasDropShadow" Value="true">
+                <Setter TargetName="shadow" Property="Margin" Value="0,0,5,5" />
+                <Setter TargetName="shadow" Property="Color" Value="#71000000" />
             </Trigger>
             <Trigger Property="HasItems" Value="false">
-                <Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
+                <Setter TargetName="dropDownBorder" Property="Height" Value="95" />
             </Trigger>
             <MultiTrigger>
                 <MultiTrigger.Conditions>
-                    <Condition Property="IsGrouping" Value="true"/>
-                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
+                    <Condition Property="IsGrouping" Value="true" />
+                    <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
                 </MultiTrigger.Conditions>
-                <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
+                <Setter Property="ScrollViewer.CanContentScroll" Value="false" />
             </MultiTrigger>
-            <Trigger Property="ScrollViewer.CanContentScroll" 
-                     SourceName="DropDownScrollViewer" 
-                     Value="false">
-                <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
-                <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
+            <Trigger SourceName="DropDownScrollViewer" Property="ScrollViewer.CanContentScroll" Value="false">
+                <Setter TargetName="opaqueRect" Property="Canvas.Top" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}" />
+                <Setter TargetName="opaqueRect" Property="Canvas.Left" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}" />
             </Trigger>
         </ControlTemplate.Triggers>
     </ControlTemplate>
 
-    <!--主要下拉框样式-->
+    <!--  主要下拉框样式  -->
     <Style x:Key="ComboBox.Primary" TargetType="{x:Type ComboBox}">
-        <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBox.FocusVisual}"/>
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}"/>
-        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}"/>
-        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}"/>
-        <Setter Property="BorderThickness" Value="1"/>
-        <Setter Property="HorizontalContentAlignment" Value="Center"/>
-        <Setter Property="VerticalContentAlignment" Value="Center"/>
-        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
-        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
-        <Setter Property="Padding" Value="6,3,5,3"/>
-        <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
-        <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
-        <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
-        <Setter Property="Cursor" Value="Hand"/>
-        <Setter Property="Template" Value="{StaticResource ComboBox.Template}"/>
+        <Setter Property="FocusVisualStyle" Value="{StaticResource ComboBox.FocusVisual}" />
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}" />
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}" />
+        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}" />
+        <Setter Property="BorderThickness" Value="1" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
+        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
+        <Setter Property="Padding" Value="6,3,5,3" />
+        <Setter Property="ScrollViewer.CanContentScroll" Value="true" />
+        <Setter Property="ScrollViewer.PanningMode" Value="Both" />
+        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
+        <Setter Property="Cursor" Value="Hand" />
+        <Setter Property="Template" Value="{StaticResource ComboBox.Template}" />
     </Style>
 
 </ResourceDictionary>

+ 158 - 112
SKMC.UI/Styles/DataGrid.xaml

@@ -1,56 +1,58 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <ResourceDictionary.MergedDictionaries>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Brushes.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/ScrollViewer.xaml"/>
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Brushes.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/ScrollViewer.xaml" />
     </ResourceDictionary.MergedDictionaries>
-    <!--标题栏样式-->
+    <!--  标题栏样式  -->
     <Style x:Key="DataGrid.ColumnHeader" TargetType="{x:Type DataGridColumnHeader}">
         <Setter Property="SnapsToDevicePixels" Value="True" />
         <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
-        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}"/>
+        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}" />
         <Setter Property="FontSize" Value="{DynamicResource FontSize.Title}" />
         <Setter Property="Cursor" Value="Hand" />
-        <Setter Property="Background" Value="{DynamicResource Brush.TextContrast}"/>
-        <Setter Property="VerticalContentAlignment" Value="Center"/>
+        <Setter Property="Background" Value="{DynamicResource Brush.TextContrast}" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
         <!--<Setter Property="HorizontalContentAlignment" Value="Center"/>-->
         <!--<Setter Property="HorizontalAlignment" Value="Center"/>-->
         <Setter Property="VerticalAlignment" Value="Center" />
-        <Setter Property="BorderBrush" Value="Transparent"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="Margin" Value="5"/>
+        <Setter Property="BorderBrush" Value="Transparent" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Margin" Value="5" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
                     <Grid>
-                        <Border x:Name="BackgroundBorder" 
-                            BorderThickness="{TemplateBinding BorderThickness}" 
+                        <Border
+                            x:Name="BackgroundBorder"
+                            Background="{TemplateBinding Background}"
                             BorderBrush="{TemplateBinding BorderBrush}"
-                            Background="{TemplateBinding Background}">
-                            <ContentPresenter  VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
-                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
-                                        Content="{TemplateBinding Content}"/>
+                            BorderThickness="{TemplateBinding BorderThickness}">
+                            <ContentPresenter
+                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                                Content="{TemplateBinding Content}" />
                         </Border>
-                        <!-- 拖动手柄 -->
-                        <Thumb x:Name="PART_RightHeaderGripper"
-                               HorizontalAlignment="Right"
-                               VerticalAlignment="Stretch"
-                               Width="4"
-                               Cursor="SizeWE"
-                               Background="Transparent">
+                        <!--  拖动手柄  -->
+                        <Thumb
+                            x:Name="PART_RightHeaderGripper"
+                            Width="4"
+                            HorizontalAlignment="Right"
+                            VerticalAlignment="Stretch"
+                            Background="Transparent"
+                            Cursor="SizeWE">
                             <Thumb.Style>
                                 <Style TargetType="{x:Type Thumb}">
-                                    <Setter Property="Background" Value="Transparent"/>
+                                    <Setter Property="Background" Value="Transparent" />
                                     <Setter Property="Template">
                                         <Setter.Value>
                                             <ControlTemplate TargetType="{x:Type Thumb}">
-                                                <Border Background="{TemplateBinding Background}"
-                                                        Margin="0 1 0 1">
-                                                    <!-- 分隔线 -->
-                                                    <Border Background="{DynamicResource Brush.Border}" 
-                                                            Width="1" 
-                                                            HorizontalAlignment="Center"
-                                                            VerticalAlignment="Stretch"/>
+                                                <Border Margin="0,1,0,1" Background="{TemplateBinding Background}">
+                                                    <!--  分隔线  -->
+                                                    <Border
+                                                        Width="1"
+                                                        HorizontalAlignment="Center"
+                                                        VerticalAlignment="Stretch"
+                                                        Background="{DynamicResource Brush.Border}" />
                                                 </Border>
                                             </ControlTemplate>
                                         </Setter.Value>
@@ -63,125 +65,169 @@
             </Setter.Value>
         </Setter>
     </Style>
-    <!--行样式触发-->
-    <Style x:Key="DataGrid.Row"  TargetType="{x:Type DataGridRow}">
+    <!--  行样式触发  -->
+    <Style x:Key="DataGrid.Row" TargetType="{x:Type DataGridRow}">
         <!--<Setter Property="Height" Value="30"/>-->
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="Focusable" Value="True"/>
-        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}"/>
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Focusable" Value="True" />
+        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}" />
         <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
         <Style.Triggers>
-            <!--隔行换色-->
-            <Trigger Property="AlternationIndex" Value="0" >
+            <!--  隔行换色  -->
+            <Trigger Property="AlternationIndex" Value="0">
                 <Setter Property="Background" Value="{DynamicResource Brush.BodyAlternative}" />
             </Trigger>
-            <Trigger Property="AlternationIndex" Value="1" >
+            <Trigger Property="AlternationIndex" Value="1">
                 <Setter Property="Background" Value="{DynamicResource Brush.HeaderAlternative}" />
             </Trigger>
             <Trigger Property="IsMouseOver" Value="True">
-                <Setter Property="Background" Value="{DynamicResource Brush.Overlay48Percent}"/>
+                <Setter Property="Background" Value="{DynamicResource Brush.Overlay48Percent}" />
             </Trigger>
         </Style.Triggers>
     </Style>
-    <!--单元格样式触发-->
+
+    <!--  单元格样式触发(不带选中)  -->
+    <Style x:Key="DataGrid.Cell.Base" TargetType="{x:Type DataGridCell}">
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="HorizontalAlignment" Value="Stretch" />
+        <Setter Property="VerticalAlignment" Value="Stretch" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="BorderBrush" Value="Transparent" />
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}" />
+        <Setter Property="OverridesDefaultStyle" Value="True" />
+        <Setter Property="Padding" Value="0,5,0,5" />
+        <Setter Property="Focusable" Value="True" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type DataGridCell}">
+                    <Border
+                        HorizontalAlignment="Stretch"
+                        VerticalAlignment="Stretch"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}">
+                        <ContentPresenter
+                            Margin="{TemplateBinding Padding}"
+                            HorizontalAlignment="Stretch"
+                            VerticalAlignment="Stretch" />
+                    </Border>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+    <!--  单元格样式触发(含选中)  -->
     <Style x:Key="DataGrid.Cell" TargetType="{x:Type DataGridCell}">
-        <Setter Property="HorizontalContentAlignment" Value="Center"/>
-        <Setter Property="VerticalContentAlignment" Value="Center"/>
-        <Setter Property="HorizontalAlignment" Value="Stretch"/>
-        <Setter Property="VerticalAlignment" Value="Stretch"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="BorderBrush" Value="Transparent"/>
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}"/>
-        <Setter Property="Margin" Value="0 5 0 5"/>
-        <Setter Property="Focusable" Value="True"/>
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="HorizontalAlignment" Value="Stretch" />
+        <Setter Property="VerticalAlignment" Value="Stretch" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="BorderBrush" Value="Transparent" />
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}" />
+        <Setter Property="OverridesDefaultStyle" Value="True" />
+        <Setter Property="Padding" Value="0,5,0,5" />
+        <Setter Property="Focusable" Value="True" />
+        <Setter Property="Cursor" Value="Hand" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type DataGridCell}">
-                    <Border Background="{TemplateBinding Background}"
-                            BorderBrush="{TemplateBinding BorderBrush}"
-                            BorderThickness="{TemplateBinding BorderThickness}"
+                    <Border
+                        HorizontalAlignment="Stretch"
+                        VerticalAlignment="Stretch"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}">
+                        <ContentPresenter
+                            Margin="{TemplateBinding Padding}"
                             HorizontalAlignment="Stretch"
-                            VerticalAlignment="Stretch">
-                        <ContentPresenter HorizontalAlignment="Stretch"
-                                          VerticalAlignment="Stretch"/>
+                            VerticalAlignment="Stretch" />
                     </Border>
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
         <Style.Triggers>
             <Trigger Property="IsSelected" Value="True">
-                <Setter Property="Foreground" Value="{DynamicResource Brush.SelectionSelected}"/>
+                <Setter Property="Foreground" Value="{DynamicResource Brush.SelectionSelected}" />
             </Trigger>
         </Style.Triggers>
     </Style>
-    
+
     <ControlTemplate x:Key="Template.DataGrid" TargetType="{x:Type DataGrid}">
-        <Border BorderBrush="{TemplateBinding BorderBrush}"
-                BorderThickness="{TemplateBinding BorderThickness}"
-                Background="{TemplateBinding Background}">
+        <Border
+            Background="{TemplateBinding Background}"
+            BorderBrush="{TemplateBinding BorderBrush}"
+            BorderThickness="{TemplateBinding BorderThickness}">
             <Grid>
                 <Grid.RowDefinitions>
-                    <RowDefinition Height="Auto"/>
-                    <RowDefinition Height="*"/>
+                    <RowDefinition Height="Auto" />
+                    <RowDefinition Height="*" />
                 </Grid.RowDefinitions>
-                <!-- 列标题 -->
-                <DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter"
-                                                Grid.Row="0"
-                                                Visibility="{TemplateBinding HeadersVisibility, Converter={x:Static DataGrid.HeadersVisibilityConverter}, ConverterParameter={x:Static DataGridHeadersVisibility.Column}}"/>
-                <!-- 内容区域 -->
-                <ScrollViewer Grid.Row="1" 
-                              x:Name="PART_ScrollViewer"
-                              Focusable="false"
-                              Padding="{TemplateBinding Padding}"
-                              CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
-                              HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
-                              VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
-                              Background="{TemplateBinding Background}"
-                              Style="{DynamicResource ScrollViewer.Default}">
-                    <ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
-                                        CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
-                                        Margin="{TemplateBinding Padding}">
-                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
+                <!--  列标题  -->
+                <DataGridColumnHeadersPresenter
+                    x:Name="PART_ColumnHeadersPresenter"
+                    Grid.Row="0"
+                    Visibility="{TemplateBinding HeadersVisibility,
+                                                 Converter={x:Static DataGrid.HeadersVisibilityConverter},
+                                                 ConverterParameter={x:Static DataGridHeadersVisibility.Column}}" />
+                <!--  内容区域  -->
+                <ScrollViewer
+                    x:Name="PART_ScrollViewer"
+                    Grid.Row="1"
+                    Padding="{TemplateBinding Padding}"
+                    Background="{TemplateBinding Background}"
+                    CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
+                    Focusable="false"
+                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
+                    Style="{DynamicResource ScrollViewer.Default}"
+                    VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
+                    <ScrollContentPresenter
+                        x:Name="PART_ScrollContentPresenter"
+                        Margin="{TemplateBinding Padding}"
+                        CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}">
+                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                     </ScrollContentPresenter>
                 </ScrollViewer>
             </Grid>
         </Border>
     </ControlTemplate>
-    <!--主要DataGrid-->
+    <!--  主要DataGrid  -->
     <Style x:Key="DataGrid.Primary" TargetType="{x:Type DataGrid}">
-        <!--网格线颜色-->
+        <!--  网格线颜色  -->
         <Setter Property="Background" Value="{DynamicResource Brush.TextContrast}" />
-        <Setter Property="Foreground" Value="{DynamicResource Brush.TextInactive}"/>
-        <Setter Property="HorizontalGridLinesBrush" Value="Transparent"/>
-        <Setter Property="VerticalGridLinesBrush" Value="Transparent"/>
-        <Setter Property="SnapsToDevicePixels" Value="True"/>
-        <Setter Property="RowHeaderWidth" Value="0"/>
-        <Setter Property="AlternatingRowBackground" Value="{DynamicResource Brush.HeaderAlternative}"/>
-        <Setter Property="CanUserAddRows" Value="False"/>
-        <Setter Property="CanUserDeleteRows" Value="False"/>
-        <Setter Property="CanUserResizeColumns" Value="False"/>
-        <Setter Property="CanUserReorderColumns" Value="False"/>
-        <Setter Property="CanUserResizeRows" Value="False"/>
-        <Setter Property="CanUserSortColumns" Value="False"/>
-        <Setter Property="AutoGenerateColumns" Value="False"/>
-        <Setter Property="ColumnHeaderStyle" Value="{DynamicResource DataGrid.ColumnHeader}"/>
-        <Setter Property="RowStyle" Value="{DynamicResource DataGrid.Row}"/>
-        <Setter Property="CellStyle" Value="{DynamicResource DataGrid.Cell}"/>
+        <Setter Property="Foreground" Value="{DynamicResource Brush.TextInactive}" />
+        <Setter Property="HorizontalGridLinesBrush" Value="Transparent" />
+        <Setter Property="VerticalGridLinesBrush" Value="Transparent" />
+        <Setter Property="SnapsToDevicePixels" Value="True" />
+        <Setter Property="RowHeaderWidth" Value="0" />
+        <Setter Property="AlternatingRowBackground" Value="{DynamicResource Brush.HeaderAlternative}" />
+        <Setter Property="CanUserAddRows" Value="False" />
+        <Setter Property="CanUserDeleteRows" Value="False" />
+        <Setter Property="CanUserResizeColumns" Value="False" />
+        <Setter Property="CanUserReorderColumns" Value="False" />
+        <Setter Property="CanUserResizeRows" Value="False" />
+        <Setter Property="CanUserSortColumns" Value="False" />
+        <Setter Property="AutoGenerateColumns" Value="False" />
+        <Setter Property="ColumnHeaderStyle" Value="{DynamicResource DataGrid.ColumnHeader}" />
+        <Setter Property="RowStyle" Value="{DynamicResource DataGrid.Row}" />
+        <Setter Property="CellStyle" Value="{DynamicResource DataGrid.Cell}" />
         <!--<Setter Property="Template" Value="{DynamicResource Template.DataGrid}"/>-->
-        <Setter Property="SelectionUnit" Value="FullRow"/>
+        <Setter Property="SelectionUnit" Value="FullRow" />
     </Style>
-    <!--DataGrid编辑文本框-->
+    <!--  DataGrid编辑文本框  -->
     <Style x:Key="DataGrid.EditingTextBox" TargetType="{x:Type TextBox}">
-        <Setter Property="HorizontalAlignment" Value="Stretch"/>
-        <Setter Property="HorizontalContentAlignment" Value="Center"/>
-        <Setter Property="VerticalAlignment" Value="Stretch"/>
-        <Setter Property="VerticalContentAlignment" Value="Center"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="Background" Value="{DynamicResource Brush.Background}"/>
+        <Setter Property="HorizontalAlignment" Value="Stretch" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalAlignment" Value="Stretch" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Background" Value="{DynamicResource Brush.Background}" />
         <!--<Setter Property="Width" Value="auto"/>-->
-        <Setter Property="Height" Value="30"/>
-        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
+        <Setter Property="Height" Value="30" />
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
     </Style>
 </ResourceDictionary>

+ 96 - 70
SKMC.UI/Styles/DatePicker.xaml

@@ -1,22 +1,23 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-                    xmlns:r="clr-namespace:SKMC.UI.ValidationRules">
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:r="clr-namespace:SKMC.UI.ValidationRules">
     <ResourceDictionary.MergedDictionaries>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/Calendar.xaml"/>
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/Calendar.xaml" />
         <!--<ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Brushes.xaml"/>-->
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Converters/Converters.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Icons.xaml"/>
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Converters/Converters.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Icons.xaml" />
     </ResourceDictionary.MergedDictionaries>
-    
-    <!--日期选择-->
+
+    <!--  日期选择  -->
     <Style x:Key="DatePicker.Primary" TargetType="{x:Type DatePicker}">
-        <Setter Property="Height" Value="30"/>
+        <Setter Property="Height" Value="30" />
         <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
         <Setter Property="Background" Value="#00FFFFFF" />
-        <Setter Property="HorizontalContentAlignment" Value="Center"/>
-        <Setter Property="VerticalContentAlignment" Value="Center"/>
-        <Setter Property="IsDropDownOpen" Value="False"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}"/>
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="IsDropDownOpen" Value="False" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}" />
         <Setter Property="BorderThickness" Value="1" />
         <Setter Property="DatePicker.IsTodayHighlighted" Value="True" />
         <Setter Property="Padding" Value="2" />
@@ -34,81 +35,102 @@
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type DatePicker}">
-                    <Border Name="PART_Root"
-                                        BorderBrush="{TemplateBinding BorderBrush}"
-                                        BorderThickness="{TemplateBinding BorderThickness}"
-                                        Background="{TemplateBinding Background}"
-                                        SnapsToDevicePixels="True">
+                    <Border
+                        Name="PART_Root"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        SnapsToDevicePixels="True">
                         <Grid>
                             <Grid.ColumnDefinitions>
-                                <ColumnDefinition Width="*"/>
-                                <ColumnDefinition Width="Auto"/>
+                                <ColumnDefinition Width="*" />
+                                <ColumnDefinition Width="Auto" />
                             </Grid.ColumnDefinitions>
-                            <TextBox x:Name="PART_TextBox" Grid.Column="0" 
-                                 HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" 
-                                 VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" 
-                                 HorizontalAlignment="Stretch"
-                                 VerticalAlignment="Center"
-                                 Focusable="{TemplateBinding UIElement.Focusable}" 
-                                 Validation.ErrorTemplate="{x:Null}"
-                                 MinWidth="100"
-                                 Background="Transparent"
-                                 BorderThickness="0"
-                                 Foreground="{TemplateBinding Foreground}"
-                                 FontSize="{TemplateBinding FontSize}"
-                                 IsReadOnly="True">
+                            <TextBox
+                                x:Name="PART_TextBox"
+                                Grid.Column="0"
+                                MinWidth="100"
+                                HorizontalAlignment="Stretch"
+                                VerticalAlignment="Center"
+                                HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
+                                VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
+                                Background="Transparent"
+                                BorderThickness="0"
+                                Focusable="{TemplateBinding UIElement.Focusable}"
+                                FontSize="{TemplateBinding FontSize}"
+                                Foreground="{TemplateBinding Foreground}"
+                                IsReadOnly="True"
+                                Validation.ErrorTemplate="{x:Null}">
                                 <TextBox.Text>
-                                    <Binding Path="SelectedDate" Converter="{StaticResource DateTimeToStringConverter}" RelativeSource="{RelativeSource AncestorType={x:Type DatePicker}}">
+                                    <Binding
+                                        Converter="{StaticResource DateTimeToStringConverter}"
+                                        Path="SelectedDate"
+                                        RelativeSource="{RelativeSource AncestorType={x:Type DatePicker}}">
                                         <Binding.ValidationRules>
-                                            <r:DateTimeRule/>
+                                            <r:DateTimeRule />
                                         </Binding.ValidationRules>
                                     </Binding>
                                 </TextBox.Text>
                             </TextBox>
-                            <Grid Name="PART_DisabledVisual" Column="0" ColumnSpan="2" IsHitTestVisible="False" Opacity="0">
+                            <Grid
+                                Name="PART_DisabledVisual"
+                                Column="0"
+                                ColumnSpan="2"
+                                IsHitTestVisible="False"
+                                Opacity="0">
                                 <Grid.ColumnDefinitions>
                                     <ColumnDefinition Width="*" />
                                     <ColumnDefinition Width="Auto" />
                                 </Grid.ColumnDefinitions>
-                                <Popup Name="PART_Popup" AllowsTransparency="True" Placement="Bottom" StaysOpen="False" PlacementTarget="{Binding ElementName=PART_TextBox}" />
+                                <Popup
+                                    Name="PART_Popup"
+                                    AllowsTransparency="True"
+                                    Placement="Bottom"
+                                    PlacementTarget="{Binding ElementName=PART_TextBox}"
+                                    StaysOpen="False" />
                             </Grid>
-                            <Button x:Name="PART_Button" 
-                                    Grid.Row="0" 
-                                    Grid.Column="1"
-                                    Margin="5">
+                            <Button
+                                x:Name="PART_Button"
+                                Grid.Row="0"
+                                Grid.Column="1"
+                                Margin="5">
                                 <Button.Style>
                                     <Style TargetType="{x:Type Button}">
-                                        <Setter Property="Height" Value="25"/>
-                                        <Setter Property="Width" Value="25"/>
-                                        <Setter Property="HorizontalAlignment" Value="Center"/>
-                                        <Setter Property="VerticalAlignment" Value="Center"/>
-                                        <Setter Property="Focusable" Value="False"/>
-                                        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-                                        <Setter Property="Background" Value="Transparent"/>
-                                        <Setter Property="HorizontalContentAlignment" Value="Center"/>
-                                        <Setter Property="VerticalContentAlignment" Value="Center"/>
-                                        <Setter Property="BorderThickness" Value="0"/>
-                                        <Setter Property="Cursor" Value="Hand"/>
+                                        <Setter Property="Height" Value="25" />
+                                        <Setter Property="Width" Value="25" />
+                                        <Setter Property="HorizontalAlignment" Value="Center" />
+                                        <Setter Property="VerticalAlignment" Value="Center" />
+                                        <Setter Property="Focusable" Value="False" />
+                                        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+                                        <Setter Property="Background" Value="Transparent" />
+                                        <Setter Property="HorizontalContentAlignment" Value="Center" />
+                                        <Setter Property="VerticalContentAlignment" Value="Center" />
+                                        <Setter Property="BorderThickness" Value="0" />
+                                        <Setter Property="Cursor" Value="Hand" />
                                         <Setter Property="Template">
                                             <Setter.Value>
                                                 <ControlTemplate TargetType="{x:Type Button}">
-                                                    <Border Background="{TemplateBinding Background}"
-                                                            BorderBrush="{TemplateBinding BorderBrush}"
-                                                            BorderThickness="{TemplateBinding BorderThickness}"
-                                                            HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
-                                                            VerticalAlignment="{TemplateBinding VerticalAlignment}">
-                                                        <Path x:Name="icon" Width="20" Height="20"
-                                                              Data="{StaticResource Icon.Calendar}"
-                                                              Stretch="Uniform"
-                                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
-                                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+                                                    <Border
+                                                        HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
+                                                        VerticalAlignment="{TemplateBinding VerticalAlignment}"
+                                                        Background="{TemplateBinding Background}"
+                                                        BorderBrush="{TemplateBinding BorderBrush}"
+                                                        BorderThickness="{TemplateBinding BorderThickness}">
+                                                        <Path
+                                                            x:Name="icon"
+                                                            Width="20"
+                                                            Height="20"
+                                                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                                                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                                                            Data="{StaticResource Icon.Calendar}"
+                                                            Stretch="Uniform" />
                                                     </Border>
                                                     <ControlTemplate.Triggers>
                                                         <Trigger Property="IsMouseOver" Value="False">
-                                                            <Setter TargetName="icon" Property="Fill" Value="{DynamicResource Brush.Icon}"/>
+                                                            <Setter TargetName="icon" Property="Fill" Value="{DynamicResource Brush.Icon}" />
                                                         </Trigger>
                                                         <Trigger Property="IsMouseOver" Value="True">
-                                                            <Setter TargetName="icon" Property="Fill" Value="{DynamicResource Brush.IconInactive}"/>
+                                                            <Setter TargetName="icon" Property="Fill" Value="{DynamicResource Brush.IconInactive}" />
                                                         </Trigger>
                                                     </ControlTemplate.Triggers>
                                                 </ControlTemplate>
@@ -116,10 +138,10 @@
                                         </Setter>
                                         <Style.Triggers>
                                             <Trigger Property="IsEnabled" Value="False">
-                                                <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonDisabled}"/>
+                                                <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonDisabled}" />
                                             </Trigger>
                                             <Trigger Property="IsPressed" Value="True">
-                                                <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonPressed}"/>
+                                                <Setter Property="Background" Value="{DynamicResource Brush.SecondaryButtonPressed}" />
                                             </Trigger>
                                         </Style.Triggers>
                                     </Style>
@@ -130,7 +152,11 @@
                                     <VisualState x:Name="Normal" />
                                     <VisualState x:Name="Disabled">
                                         <Storyboard>
-                                            <DoubleAnimation Storyboard.TargetName="PART_DisabledVisual" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
+                                            <DoubleAnimation
+                                                Storyboard.TargetName="PART_DisabledVisual"
+                                                Storyboard.TargetProperty="Opacity"
+                                                To="1"
+                                                Duration="0" />
                                         </Storyboard>
                                     </VisualState>
                                 </VisualStateGroup>
@@ -138,14 +164,14 @@
                         </Grid>
                     </Border>
                     <ControlTemplate.Triggers>
-                        <DataTrigger Value="false" Binding="{Binding Source={x:Static SystemParameters.HighContrast}}">
+                        <DataTrigger Binding="{Binding Source={x:Static SystemParameters.HighContrast}}" Value="false">
                             <Setter TargetName="PART_TextBox" Property="Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}" />
                         </DataTrigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
-        <!-- 日历样式 -->
-        <Setter Property="DatePicker.CalendarStyle" Value="{StaticResource Calendar.Primary}"/>
+        <!--  日历样式  -->
+        <Setter Property="DatePicker.CalendarStyle" Value="{StaticResource Calendar.Primary}" />
     </Style>
 </ResourceDictionary>

+ 49 - 49
SKMC.UI/Styles/ListView.xaml

@@ -1,54 +1,54 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <ResourceDictionary.MergedDictionaries>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Brushes.xaml"/>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/ScrollViewer.xaml"/>
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Brushes.xaml" />
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Styles/ScrollViewer.xaml" />
     </ResourceDictionary.MergedDictionaries>
-    <!--列表头样式-->
+    <!--  列表头样式  -->
     <Style x:Key="ListView.ColumnHeader" TargetType="{x:Type GridViewColumnHeader}">
         <Setter Property="SnapsToDevicePixels" Value="True" />
         <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
-        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}"/>
+        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}" />
         <Setter Property="FontSize" Value="{DynamicResource FontSize.Title}" />
         <Setter Property="Cursor" Value="Hand" />
-        <Setter Property="Background" Value="{DynamicResource Brush.DashboardBackground}"/>
-        <Setter Property="VerticalContentAlignment" Value="Center"/>
-        <Setter Property="HorizontalContentAlignment" Value="Center"/>
+        <Setter Property="Background" Value="{DynamicResource Brush.DashboardBackground}" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
         <Setter Property="VerticalAlignment" Value="Center" />
-        <Setter Property="BorderBrush" Value="Transparent"/>
-        <Setter Property="BorderThickness" Value="0"/>
+        <Setter Property="BorderBrush" Value="Transparent" />
+        <Setter Property="BorderThickness" Value="0" />
     </Style>
 
-    <!-- 列表项样式 -->
+    <!--  列表项样式  -->
     <Style x:Key="ListView.ListViewItem" TargetType="{x:Type ListViewItem}">
-        <Setter Property="Focusable" Value="True"/>
-        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}"/>
+        <Setter Property="Focusable" Value="True" />
+        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}" />
         <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="Padding" Value="0 3 0 3"/>
-        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
-        <Setter Property="VerticalContentAlignment" Value="Center"/>
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Padding" Value="0,3,0,3" />
+        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type ListViewItem}">
-                    <Border Background="{TemplateBinding Background}"
-                            BorderBrush="{TemplateBinding BorderBrush}"
-                            BorderThickness="{TemplateBinding BorderThickness}"
-                            Padding="{TemplateBinding Padding}"
-                            SnapsToDevicePixels="True"
-                            x:Name="bd">
-                        <GridViewRowPresenter Content="{TemplateBinding Content}"
-                                              Columns="{TemplateBinding GridView.ColumnCollection}"
-                                              Margin="{TemplateBinding Padding}"
-                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
-                                              />
+                    <Border
+                        x:Name="bd"
+                        Padding="{TemplateBinding Padding}"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        SnapsToDevicePixels="True">
+                        <GridViewRowPresenter
+                            Margin="{TemplateBinding Padding}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Columns="{TemplateBinding GridView.ColumnCollection}"
+                            Content="{TemplateBinding Content}" />
                     </Border>
                     <ControlTemplate.Triggers>
-                         <!--鼠标悬停--> 
+                        <!--  鼠标悬停  -->
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter TargetName="bd" Property="Background" Value="{DynamicResource Brush.Overlay48Percent}"/>
+                            <Setter TargetName="bd" Property="Background" Value="{DynamicResource Brush.Overlay48Percent}" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
@@ -57,13 +57,13 @@
         <Style.Triggers>
             <Trigger Property="IsSelected" Value="True">
                 <!--<Setter Property="Background" Value="{DynamicResource Brush.TextContrast}"/>-->
-                <Setter Property="Foreground" Value="{DynamicResource Brush.SelectionSelected}"/>
+                <Setter Property="Foreground" Value="{DynamicResource Brush.SelectionSelected}" />
             </Trigger>
-            <!-- 鼠标悬停 -->
+            <!--  鼠标悬停  -->
             <Trigger Property="IsMouseOver" Value="True">
-                <Setter Property="Background" Value="{DynamicResource Brush.Overlay48Percent}"/>
+                <Setter Property="Background" Value="{DynamicResource Brush.Overlay48Percent}" />
             </Trigger>
-            <!-- 交替行背景 -->
+            <!--  交替行背景  -->
             <Trigger Property="ItemsControl.AlternationIndex" Value="0">
                 <Setter Property="Background" Value="{DynamicResource Brush.BodyAlternative}" />
             </Trigger>
@@ -73,19 +73,19 @@
         </Style.Triggers>
     </Style>
 
-    <!-- 主要ListView样式 -->
+    <!--  主要ListView样式  -->
     <Style x:Key="ListView.Primary" TargetType="{x:Type ListView}">
         <Setter Property="Background" Value="{DynamicResource Brush.TextContrast}" />
-        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-        <Setter Property="SnapsToDevicePixels" Value="True"/>
-        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="Padding" Value="0"/>
-        <Setter Property="AlternationCount" Value="2"/>
-        <Setter Property="ItemContainerStyle" Value="{DynamicResource ListView.ListViewItem}"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}"/>
-        <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
-        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
-        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+        <Setter Property="SnapsToDevicePixels" Value="True" />
+        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Padding" Value="0" />
+        <Setter Property="AlternationCount" Value="2" />
+        <Setter Property="ItemContainerStyle" Value="{DynamicResource ListView.ListViewItem}" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}" />
+        <Setter Property="ScrollViewer.CanContentScroll" Value="True" />
+        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
+        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
     </Style>
 </ResourceDictionary>

+ 123 - 0
SKMC.UI/Styles/PasswordBox.xaml

@@ -0,0 +1,123 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+    <!--  密码框  -->
+    <Style x:Key="PasswordBox.Base" TargetType="{x:Type PasswordBox}">
+        <Setter Property="Height" Value="30" />
+        <Setter Property="Width" Value="220" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}" />
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}" />
+        <Setter Property="BorderThickness" Value="1" />
+        <Setter Property="Padding" Value="0,0,0,0" />
+        <Setter Property="SnapsToDevicePixels" Value="True" />
+        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
+        <Setter Property="Focusable" Value="True" />
+        <Setter Property="CaretBrush" Value="{DynamicResource Brush.Text}" />
+
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type PasswordBox}">
+                    <Grid>
+                        <Border
+                            x:Name="border"
+                            Background="{TemplateBinding Background}"
+                            BorderBrush="{TemplateBinding BorderBrush}"
+                            BorderThickness="{TemplateBinding BorderThickness}"
+                            SnapsToDevicePixels="True">
+                            <Grid>
+                                <Grid.ColumnDefinitions>
+                                    <ColumnDefinition Width="*" />
+                                    <ColumnDefinition Width="Auto" />
+                                </Grid.ColumnDefinitions>
+                                <!--  密码输入区域  -->
+                                <ScrollViewer
+                                    x:Name="PART_ContentHost"
+                                    Grid.Column="0"
+                                    Margin="{TemplateBinding Padding}"
+                                    VerticalAlignment="Center" />
+
+                                <!--  显示密码按钮  -->
+                                <!--<ToggleButton
+                                    x:Name="ToggleShowPassword"
+                                    Grid.Column="1"
+                                    Width="30"
+                                    Height="30"
+                                    Margin="0,0,5,0"
+                                    VerticalAlignment="Center"
+                                    Cursor="Hand"
+                                    Focusable="False"
+                                    ToolTip="显示密码">
+                                    <ToggleButton.Style>
+                                        <Style TargetType="ToggleButton">
+                                            <Setter Property="Background" Value="Transparent" />
+                                            <Setter Property="BorderThickness" Value="0" />
+                                            <Setter Property="Template">
+                                                <Setter.Value>
+                                                    <ControlTemplate TargetType="ToggleButton">
+                                                        <Border Background="{TemplateBinding Background}" BorderThickness="0">
+                                                            <Path
+                                                                x:Name="EyeIcon"
+                                                                Width="20"
+                                                                Height="14"
+                                                                Data="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5z M12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z M12,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z"
+                                                                Fill="#7F8C8D"
+                                                                Stretch="Uniform" />
+                                                        </Border>
+                                                        <ControlTemplate.Triggers>
+                                                            <Trigger Property="IsChecked" Value="True">
+                                                                <Setter TargetName="EyeIcon" Property="Data" Value="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5z M12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z M12,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z M2.39,2.74 l17.22,17.22" />
+                                                                <Setter TargetName="EyeIcon" Property="Fill" Value="#4A90D9" />
+                                                            </Trigger>
+                                                            <Trigger Property="IsMouseOver" Value="True">
+                                                                <Setter TargetName="EyeIcon" Property="Fill" Value="#4A90D9" />
+                                                            </Trigger>
+                                                        </ControlTemplate.Triggers>
+                                                    </ControlTemplate>
+                                                </Setter.Value>
+                                            </Setter>
+                                        </Style>
+                                    </ToggleButton.Style>
+                                </ToggleButton>-->
+                            </Grid>
+                        </Border>
+
+                        <!--  验证状态指示器  -->
+                        <Border
+                            x:Name="ValidationBorder"
+                            BorderBrush="Red"
+                            BorderThickness="2"
+                            CornerRadius="6"
+                            IsHitTestVisible="False"
+                            Visibility="Collapsed" />
+                    </Grid>
+
+                    <ControlTemplate.Triggers>
+
+                        <Trigger Property="IsMouseOver" Value="True">
+                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource Brush.Signature}" />
+                        </Trigger>
+
+                        <Trigger Property="IsFocused" Value="True">
+                            <Setter TargetName="border" Property="BorderBrush" Value="{DynamicResource Brush.Signature}" />
+                            <Setter TargetName="border" Property="BorderThickness" Value="2" />
+                        </Trigger>
+
+                        <!--  禁用状态  -->
+                        <Trigger Property="IsEnabled" Value="False">
+                            <Setter TargetName="border" Property="Background" Value="#F0F0F0" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="#D5D5D5" />
+                            <Setter Property="Foreground" Value="#999999" />
+                        </Trigger>
+
+                        <!--  验证状态  -->
+                        <Trigger Property="Validation.HasError" Value="True">
+                            <Setter TargetName="border" Property="BorderBrush" Value="#E74C3C" />
+                            <Setter TargetName="border" Property="BorderThickness" Value="2" />
+                            <Setter TargetName="ValidationBorder" Property="Visibility" Value="Visible" />
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+</ResourceDictionary>

+ 108 - 79
SKMC.UI/Styles/RadioButton.xaml

@@ -1,75 +1,89 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-                    xmlns:c="clr-namespace:SKMC.UI.CustomControls">
-    <!--系统菜单按钮-->
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:c="clr-namespace:SKMC.UI.CustomControls">
+    <!--  系统菜单按钮  -->
     <Style x:Key="RadioButton.SystemMenu" TargetType="{x:Type c:SKRadioButton}">
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-        <Setter Property="Cursor" Value="Hand"/>
-        <Setter Property="FontWeight" Value="Normal"/>
-        <Setter Property="FontSize" Value="20"/>
-        <Setter Property="Height" Value="40"/>
-        <Setter Property="IconWidth" Value="24"/>
-        <Setter Property="IconHeight" Value="24"/>
-        <Setter Property="IconFillColor" Value="Transparent"/>
-        <Setter Property="IconStrokeColor" Value="{DynamicResource Brush.Icon}"/>
-        <Setter Property="IconStrokeThickness" Value="1"/>
-        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}"/>
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+        <Setter Property="Cursor" Value="Hand" />
+        <Setter Property="FontWeight" Value="Normal" />
+        <Setter Property="FontSize" Value="20" />
+        <Setter Property="Height" Value="40" />
+        <Setter Property="IconWidth" Value="24" />
+        <Setter Property="IconHeight" Value="24" />
+        <Setter Property="IconFillColor" Value="Transparent" />
+        <Setter Property="IconStrokeColor" Value="{DynamicResource Brush.Icon}" />
+        <Setter Property="IconStrokeThickness" Value="1" />
+        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type c:SKRadioButton}">
-                    <Border x:Name="menuButton"  
-                        Background="{TemplateBinding Background}" 
+                    <Border
+                        x:Name="menuButton"
+                        Background="{TemplateBinding Background}"
                         BorderThickness="{TemplateBinding BorderThickness}"
                         CornerRadius="{TemplateBinding CornerRadius}">
                         <Grid>
                             <Grid.ColumnDefinitions>
-                                <ColumnDefinition Width="45"/>
-                                <ColumnDefinition/>
+                                <ColumnDefinition Width="45" />
+                                <ColumnDefinition />
                             </Grid.ColumnDefinitions>
-                            <!-- Selected  -->
-                            <Border x:Name="btnSelected" Grid.ColumnSpan="2"  CornerRadius="4" Width="210" HorizontalAlignment="Right"/>
-                            <!-- Indicator -->
-                            <!--<Rectangle Name="Indicator" HorizontalAlignment="Left" 
-                                   Width="5" Height="50" VerticalAlignment="Stretch" 
+                            <!--  Selected  -->
+                            <Border
+                                x:Name="btnSelected"
+                                Grid.ColumnSpan="2"
+                                Width="210"
+                                HorizontalAlignment="Right"
+                                CornerRadius="4" />
+                            <!--  Indicator  -->
+                            <!--<Rectangle Name="Indicator" HorizontalAlignment="Left"
+                                   Width="5" Height="50" VerticalAlignment="Stretch"
                                    RadiusX="2" RadiusY="2"
                                    Margin="5 0 0 0"/>-->
-                            <!-- Icon -->
-                            <Path x:Name="Icon" Data="{Binding Icon, RelativeSource={RelativeSource AncestorType={x:Type c:SKRadioButton}}}" 
-                                  Height="{TemplateBinding IconHeight}" 
-                                  Width="{TemplateBinding IconWidth}" 
-                                  Stretch="Uniform" 
-                                  Stroke="{TemplateBinding IconStrokeColor}"
-                                  Fill="{TemplateBinding IconFillColor}"
-                                  StrokeThickness="{TemplateBinding IconStrokeThickness}"
-                                  VerticalAlignment="Center" 
-                                  HorizontalAlignment="Center"/>
-                            <!-- Text -->
-                            <TextBlock x:Name="txtName" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5 0 0 0"
-                                       Grid.Column="1" Text="{TemplateBinding Content}" 
-                                       Foreground="{TemplateBinding Foreground}"
-                                       FontWeight="{TemplateBinding FontWeight}"
-                                       FontSize="{TemplateBinding FontSize}"/>
+                            <!--  Icon  -->
+                            <Path
+                                x:Name="Icon"
+                                Width="{TemplateBinding IconWidth}"
+                                Height="{TemplateBinding IconHeight}"
+                                HorizontalAlignment="Center"
+                                VerticalAlignment="Center"
+                                Data="{Binding Icon, RelativeSource={RelativeSource AncestorType={x:Type c:SKRadioButton}}}"
+                                Fill="{TemplateBinding IconFillColor}"
+                                Stretch="Uniform"
+                                Stroke="{TemplateBinding IconStrokeColor}"
+                                StrokeThickness="{TemplateBinding IconStrokeThickness}" />
+                            <!--  Text  -->
+                            <TextBlock
+                                x:Name="txtName"
+                                Grid.Column="1"
+                                Margin="5,0,0,0"
+                                HorizontalAlignment="Left"
+                                VerticalAlignment="Center"
+                                FontSize="{TemplateBinding FontSize}"
+                                FontWeight="{TemplateBinding FontWeight}"
+                                Foreground="{TemplateBinding Foreground}"
+                                Text="{TemplateBinding Content}" />
                         </Grid>
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter TargetName="txtName" Property="Foreground" Value="{DynamicResource Brush.ChartLine.5}"/>
-                            <Setter TargetName="Icon" Property="Fill" Value="{DynamicResource Brush.ButtonHover}"/>
-                            <Setter TargetName="Icon" Property="Stroke" Value="{DynamicResource Brush.ButtonHover}"/>
+                            <Setter TargetName="txtName" Property="Foreground" Value="{DynamicResource Brush.ChartLine.5}" />
+                            <Setter TargetName="Icon" Property="Fill" Value="{DynamicResource Brush.ButtonHover}" />
+                            <Setter TargetName="Icon" Property="Stroke" Value="{DynamicResource Brush.ButtonHover}" />
                         </Trigger>
                         <Trigger Property="IsChecked" Value="True">
-                            <Setter TargetName="Icon" Property="Fill" Value="{DynamicResource Brush.SelectionSelected}"/>
-                            <Setter TargetName="Icon" Property="Stroke" Value="{DynamicResource Brush.SelectionSelected}"/>
-                            <Setter TargetName="btnSelected" Property="Background" Value="{DynamicResource Brush.DashboardBackground}"/>
-                            <Setter TargetName="txtName" Property="Foreground" Value="{DynamicResource Brush.SelectionSelected}"/>
+                            <Setter TargetName="Icon" Property="Fill" Value="{DynamicResource Brush.SelectionSelected}" />
+                            <Setter TargetName="Icon" Property="Stroke" Value="{DynamicResource Brush.SelectionSelected}" />
+                            <Setter TargetName="btnSelected" Property="Background" Value="{DynamicResource Brush.DashboardBackground}" />
+                            <Setter TargetName="txtName" Property="Foreground" Value="{DynamicResource Brush.SelectionSelected}" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
     </Style>
-    <!--基础按钮-->
+    <!--  基础按钮  -->
     <Style x:Key="RadioButton.Base" TargetType="{x:Type RadioButton}">
         <Setter Property="BorderBrush" Value="{DynamicResource Brush.SelectedBorder}" />
         <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
@@ -80,18 +94,31 @@
                 <ControlTemplate TargetType="{x:Type RadioButton}">
                     <BulletDecorator Background="#00FFFFFF">
                         <BulletDecorator.Bullet>
-                            <Border Name="Border" Width="32" Height="32" BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="2" CornerRadius="16">
-                                <Ellipse Name="Ellipse" Width="18" Height="18" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="{DynamicResource Brush.SelectionSelected}" Visibility="Hidden" />
+                            <Border
+                                Name="Border"
+                                Width="32"
+                                Height="32"
+                                BorderBrush="{TemplateBinding Control.BorderBrush}"
+                                BorderThickness="2"
+                                CornerRadius="16">
+                                <Ellipse
+                                    Name="Ellipse"
+                                    Width="18"
+                                    Height="18"
+                                    HorizontalAlignment="Center"
+                                    VerticalAlignment="Center"
+                                    Fill="{DynamicResource Brush.SelectionSelected}"
+                                    Visibility="Hidden" />
                             </Border>
                         </BulletDecorator.Bullet>
                         <ContentPresenter Margin="16,0,0,0" VerticalAlignment="Center" />
                     </BulletDecorator>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsEnabled" Value="False">
-                            <Setter Value="{DynamicResource Brush.Overlay3Percent}" Property="BorderBrush" />
+                            <Setter Property="BorderBrush" Value="{DynamicResource Brush.Overlay3Percent}" />
                         </Trigger>
                         <Trigger Property="IsChecked" Value="True">
-                            <Setter Value="{DynamicResource Brush.SelectionSelected}" Property="BorderBrush" />
+                            <Setter Property="BorderBrush" Value="{DynamicResource Brush.SelectionSelected}" />
                             <Setter TargetName="Ellipse" Property="Visibility" Value="Visible" />
                         </Trigger>
                     </ControlTemplate.Triggers>
@@ -101,41 +128,43 @@
         <Setter Property="ToolTip" Value="{Binding Content, RelativeSource={RelativeSource Self}}" />
     </Style>
     <!--<Style x:Key="{x:Type RadioButton}" BasedOn="{StaticResource RadioButton.Base}" TargetType="{x:Type RadioButton}" />-->
-    <!--主要按钮-->
+    <!--  主要按钮  -->
     <Style x:Key="RadioButton.Primary" TargetType="{x:Type RadioButton}">
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-        <Setter Property="HorizontalContentAlignment" Value="Center"/>
-        <Setter Property="VerticalContentAlignment" Value="Center"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="Cursor" Value="Hand"/>
-        <Setter Property="FontWeight" Value="Normal"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Callout}"/>
-        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}"/>
-        <Setter Property="Height" Value="40"/>
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Cursor" Value="Hand" />
+        <Setter Property="FontWeight" Value="Normal" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Callout}" />
+        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}" />
+        <Setter Property="Height" Value="40" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type RadioButton}">
-                    <Border x:Name="menuButton"  
-                            Background="{TemplateBinding Background}" 
-                            BorderThickness="{TemplateBinding BorderThickness}"
-                            BorderBrush="{TemplateBinding BorderBrush}">
-                        <TextBlock x:Name="txtName" 
-                                   HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
-                                   VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
-                                   Text="{TemplateBinding Content}" 
-                                   Foreground="{TemplateBinding Foreground}"
-                                   FontWeight="{TemplateBinding FontWeight}"
-                                   FontSize="{Binding FontSize,RelativeSource={RelativeSource TemplatedParent}}"
-                                   FontFamily="{TemplateBinding FontFamily}"/>
+                    <Border
+                        x:Name="menuButton"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}">
+                        <TextBlock
+                            x:Name="txtName"
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            FontFamily="{TemplateBinding FontFamily}"
+                            FontSize="{Binding FontSize, RelativeSource={RelativeSource TemplatedParent}}"
+                            FontWeight="{TemplateBinding FontWeight}"
+                            Foreground="{TemplateBinding Foreground}"
+                            Text="{TemplateBinding Content}" />
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter TargetName="txtName" Property="Foreground" Value="{DynamicResource Brush.SelectionSelected}"/>
+                            <Setter TargetName="txtName" Property="Foreground" Value="{DynamicResource Brush.SelectionSelected}" />
                         </Trigger>
                         <Trigger Property="IsChecked" Value="True">
-                            <Setter TargetName="txtName" Property="Foreground" Value="{DynamicResource Brush.SelectionSelected}"/>
-                            <Setter TargetName="menuButton" Property="Background" Value="{DynamicResource Brush.DashboardBackground}"/>
+                            <Setter TargetName="txtName" Property="Foreground" Value="{DynamicResource Brush.SelectionSelected}" />
+                            <Setter TargetName="menuButton" Property="Background" Value="{DynamicResource Brush.DashboardBackground}" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>

+ 169 - 116
SKMC.UI/Styles/ScrollViewer.xaml

@@ -1,70 +1,72 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <ResourceDictionary.MergedDictionaries>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Brushes.xaml"/>
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Brushes.xaml" />
     </ResourceDictionary.MergedDictionaries>
-    <!--滚动条两头的按钮-->
+    <!--  滚动条两头的按钮  -->
     <Style x:Key="ScrollBarButton" TargetType="{x:Type RepeatButton}">
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="Foreground" Value="Gray"/>
-        <Setter Property="VerticalAlignment" Value="Center"/>
-        <Setter Property="HorizontalAlignment" Value="Center"/>
-        <Setter Property="Width" Value="20"/>
-        <Setter Property="Height" Value="20"/>
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Foreground" Value="Gray" />
+        <Setter Property="VerticalAlignment" Value="Center" />
+        <Setter Property="HorizontalAlignment" Value="Center" />
+        <Setter Property="Width" Value="20" />
+        <Setter Property="Height" Value="20" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type RepeatButton}">
                     <Border Background="{TemplateBinding Background}">
-                        <Path x:Name="btnIcon" 
-                              Data="{TemplateBinding Content}" 
-                              Fill="{TemplateBinding Foreground}" 
-                              Width="{TemplateBinding Width}" 
-                              Height="{TemplateBinding Height}" 
-                              Stretch="Uniform"
-                              HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
-                              VerticalAlignment="{TemplateBinding VerticalAlignment}"/>
+                        <Path
+                            x:Name="btnIcon"
+                            Width="{TemplateBinding Width}"
+                            Height="{TemplateBinding Height}"
+                            HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalAlignment}"
+                            Data="{TemplateBinding Content}"
+                            Fill="{TemplateBinding Foreground}"
+                            Stretch="Uniform" />
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter Property="Fill" Value="{DynamicResource Brush.ButtonHover}" TargetName="btnIcon"></Setter>
+                            <Setter TargetName="btnIcon" Property="Fill" Value="{DynamicResource Brush.ButtonHover}" />
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="False">
-                            <Setter Property="Opacity" Value="0.5" TargetName="btnIcon"/>
+                            <Setter TargetName="btnIcon" Property="Opacity" Value="0.5" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
     </Style>
-    <!--滚动条滑块两边按钮样式-->
+    <!--  滚动条滑块两边按钮样式  -->
     <Style x:Key="ScrollBarTrackButton" TargetType="{x:Type RepeatButton}">
-        <Setter Property="Background" Value="#CCCCCC"/>
+        <Setter Property="Background" Value="#CCCCCC" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type RepeatButton}">
-                    <Border Background="{TemplateBinding Background}"/>
+                    <Border Background="{TemplateBinding Background}" />
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
     </Style>
-    <!--滚动条滑块样式-->
+    <!--  滚动条滑块样式  -->
     <ControlTemplate x:Key="ThumbTemplate" TargetType="{x:Type Thumb}">
-        <Border x:Name="sliderBar" CornerRadius="8" 
-                SnapsToDevicePixels="True" 
-                Background="#505050"/>
+        <Border
+            x:Name="sliderBar"
+            Background="#505050"
+            CornerRadius="8"
+            SnapsToDevicePixels="True" />
         <ControlTemplate.Triggers>
             <Trigger Property="IsMouseOver" Value="True">
-                <Setter Property="Background" Value="#8E8E93" TargetName="sliderBar"/>
+                <Setter TargetName="sliderBar" Property="Background" Value="#8E8E93" />
             </Trigger>
             <Trigger Property="IsMouseOver" Value="False">
-                <Setter Property="Background" Value="#505050" TargetName="sliderBar"/>
+                <Setter TargetName="sliderBar" Property="Background" Value="#505050" />
             </Trigger>
             <Trigger Property="IsEnabled" Value="False">
-                <Setter Property="Opacity" Value="0.5" TargetName="sliderBar"/>
+                <Setter TargetName="sliderBar" Property="Opacity" Value="0.5" />
             </Trigger>
         </ControlTemplate.Triggers>
     </ControlTemplate>
-    <!--水平滚滚动条模板-->
+    <!--  水平滚滚动条模板  -->
     <ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
         <Grid x:Name="HorizontalRoot" Height="{TemplateBinding Height}">
             <Grid.ColumnDefinitions>
@@ -72,49 +74,68 @@
                 <ColumnDefinition Width="*" />
                 <ColumnDefinition Width="Auto" />
             </Grid.ColumnDefinitions>
-            <!--内部背景-->
-            <Border x:Name="BgInner" Grid.Column="1" SnapsToDevicePixels="True" CornerRadius="6"
-                    Background="#CCCCCC"/>
-            <!--左按钮-->
+            <!--  内部背景  -->
+            <Border
+                x:Name="BgInner"
+                Grid.Column="1"
+                Background="#CCCCCC"
+                CornerRadius="6"
+                SnapsToDevicePixels="True" />
+            <!--  左按钮  -->
             <Border Grid.Column="0">
-                <RepeatButton  x:Name="HorizontalSmallDecrease" 
-                               Content="{DynamicResource Icon.ArrowLeft}"  
-                               Style="{StaticResource ScrollBarButton}" 
-                               IsTabStop="False" Interval="50"
-                               Command="ScrollBar.LineLeftCommand"/>
+                <RepeatButton
+                    x:Name="HorizontalSmallDecrease"
+                    Command="ScrollBar.LineLeftCommand"
+                    Content="{DynamicResource Icon.ArrowLeft}"
+                    Interval="50"
+                    IsTabStop="False"
+                    Style="{StaticResource ScrollBarButton}" />
             </Border>
-            <!--中间滑动区域-->
-            <Track x:Name="PART_Track" IsDirectionReversed="False" Grid.Column="1">
-                <!--左滑块-->
+            <!--  中间滑动区域  -->
+            <Track
+                x:Name="PART_Track"
+                Grid.Column="1"
+                IsDirectionReversed="False">
+                <!--  左滑块  -->
                 <Track.DecreaseRepeatButton>
-                    <RepeatButton x:Name="HorizontalLargeDecrease" Command="ScrollBar.PageLeftCommand"
-                                      IsTabStop="False" Interval="50" Style="{StaticResource ScrollBarTrackButton}" />
+                    <RepeatButton
+                        x:Name="HorizontalLargeDecrease"
+                        Command="ScrollBar.PageLeftCommand"
+                        Interval="50"
+                        IsTabStop="False"
+                        Style="{StaticResource ScrollBarTrackButton}" />
                 </Track.DecreaseRepeatButton>
-                <!--中间滑块 Margin="1" VerticalAlignment="Center" VerticalContentAlignment="Center" -->
+                <!--  中间滑块 Margin="1" VerticalAlignment="Center" VerticalContentAlignment="Center"  -->
                 <Track.Thumb>
                     <Thumb Template="{StaticResource ThumbTemplate}" />
                 </Track.Thumb>
-                <!--右滑块-->
+                <!--  右滑块  -->
                 <Track.IncreaseRepeatButton>
-                    <RepeatButton x:Name="HorizontalLargeIncrease" Command="ScrollBar.PageRightCommand"
-                                      IsTabStop="False"  Interval="50" Style="{StaticResource ScrollBarTrackButton}" />
+                    <RepeatButton
+                        x:Name="HorizontalLargeIncrease"
+                        Command="ScrollBar.PageRightCommand"
+                        Interval="50"
+                        IsTabStop="False"
+                        Style="{StaticResource ScrollBarTrackButton}" />
                 </Track.IncreaseRepeatButton>
             </Track>
-            <!--右按钮-->
+            <!--  右按钮  -->
             <Border Grid.Column="2">
-                <RepeatButton Content="{DynamicResource Icon.ArrowRight}"  
-                              Style="{StaticResource ScrollBarButton}"
-                              IsTabStop="False" Interval="50"
-                              Command="ScrollBar.LineRightCommand"/>
+                <RepeatButton
+                    Command="ScrollBar.LineRightCommand"
+                    Content="{DynamicResource Icon.ArrowRight}"
+                    Interval="50"
+                    IsTabStop="False"
+                    Style="{StaticResource ScrollBarButton}" />
             </Border>
         </Grid>
         <ControlTemplate.Triggers>
             <Trigger Property="IsMouseOver" Value="true">
-                <Setter TargetName="BgInner" Property="Opacity" Value="0.5"/>
+                <Setter TargetName="BgInner" Property="Opacity" Value="0.5" />
             </Trigger>
         </ControlTemplate.Triggers>
     </ControlTemplate>
-    <!--垂直滚滚动条模板-->
+    <!--  垂直滚滚动条模板  -->
     <ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
         <Grid x:Name="VerticalRoot" Height="{TemplateBinding Height}">
             <Grid.RowDefinitions>
@@ -122,53 +143,70 @@
                 <RowDefinition Height="*" />
                 <RowDefinition Height="Auto" />
             </Grid.RowDefinitions>
-            <!--内部背景-->
-            <Border x:Name="BgInner" Grid.Row="1" CornerRadius="6" SnapsToDevicePixels ="True"
-                    Background="#CCCCCC"/>
-            <!--上按钮-->
-            <Border Grid.Row="0" x:Name="VerticalSmallDecrease" Background="Transparent">
-                <RepeatButton Content="{DynamicResource Icon.ArrowUp}"  
-                              Style="{StaticResource ScrollBarButton}"
-                              IsTabStop="False" Interval="50"
-                              Command="ScrollBar.LineUpCommand"/>
+            <!--  内部背景  -->
+            <Border
+                x:Name="BgInner"
+                Grid.Row="1"
+                Background="#CCCCCC"
+                CornerRadius="6"
+                SnapsToDevicePixels="True" />
+            <!--  上按钮  -->
+            <Border
+                x:Name="VerticalSmallDecrease"
+                Grid.Row="0"
+                Background="Transparent">
+                <RepeatButton
+                    Command="ScrollBar.LineUpCommand"
+                    Content="{DynamicResource Icon.ArrowUp}"
+                    Interval="50"
+                    IsTabStop="False"
+                    Style="{StaticResource ScrollBarButton}" />
             </Border>
-            <!--中间滑动区域-->
-            <Track x:Name="PART_Track" IsDirectionReversed="true" Grid.Row="1">
-                <!--上滑块-->
+            <!--  中间滑动区域  -->
+            <Track
+                x:Name="PART_Track"
+                Grid.Row="1"
+                IsDirectionReversed="true">
+                <!--  上滑块  -->
                 <Track.DecreaseRepeatButton>
-                    <RepeatButton x:Name="HorizontalLargeDecrease" 
-                                  Command="ScrollBar.PageUpCommand"
-                                  IsTabStop="False" Interval="50" 
-                                  Style="{StaticResource ScrollBarTrackButton}" />
+                    <RepeatButton
+                        x:Name="HorizontalLargeDecrease"
+                        Command="ScrollBar.PageUpCommand"
+                        Interval="50"
+                        IsTabStop="False"
+                        Style="{StaticResource ScrollBarTrackButton}" />
                 </Track.DecreaseRepeatButton>
-                <!--中间滑块-->
+                <!--  中间滑块  -->
                 <Track.Thumb>
-                    <Thumb Template="{StaticResource ThumbTemplate}" MinHeight="10"/>
+                    <Thumb MinHeight="10" Template="{StaticResource ThumbTemplate}" />
                 </Track.Thumb>
-                <!--下滑块-->
+                <!--  下滑块  -->
                 <Track.IncreaseRepeatButton>
-                    <RepeatButton x:Name="HorizontalLargeIncrease" 
-                                  Command="ScrollBar.PageDownCommand"
-                                  IsTabStop="False" 
-                                  Interval="50" 
-                                  Style="{StaticResource ScrollBarTrackButton}"/>
+                    <RepeatButton
+                        x:Name="HorizontalLargeIncrease"
+                        Command="ScrollBar.PageDownCommand"
+                        Interval="50"
+                        IsTabStop="False"
+                        Style="{StaticResource ScrollBarTrackButton}" />
                 </Track.IncreaseRepeatButton>
             </Track>
-            <!--下按钮-->
-            <Border Grid.Row="2" x:Name="VerticalSmallIncrease">
-                <RepeatButton Content="{DynamicResource Icon.ArrowDown}" 
-                              Style="{StaticResource ScrollBarButton}"
-                              IsTabStop="False" Interval="50"
-                              Command="ScrollBar.LineDownCommand"/>
+            <!--  下按钮  -->
+            <Border x:Name="VerticalSmallIncrease" Grid.Row="2">
+                <RepeatButton
+                    Command="ScrollBar.LineDownCommand"
+                    Content="{DynamicResource Icon.ArrowDown}"
+                    Interval="50"
+                    IsTabStop="False"
+                    Style="{StaticResource ScrollBarButton}" />
             </Border>
         </Grid>
         <ControlTemplate.Triggers>
             <Trigger Property="IsMouseOver" Value="true">
-                <Setter TargetName="BgInner" Property="Opacity" Value="0.5"/>
+                <Setter TargetName="BgInner" Property="Opacity" Value="0.5" />
             </Trigger>
         </ControlTemplate.Triggers>
     </ControlTemplate>
-    <!--ScrollBar样式-->
+    <!--  ScrollBar样式  -->
     <Style x:Key="DefaultScrollBar" TargetType="{x:Type ScrollBar}">
         <Setter Property="SnapsToDevicePixels" Value="True" />
         <Setter Property="OverridesDefaultStyle" Value="true" />
@@ -183,49 +221,64 @@
             </Trigger>
         </Style.Triggers>
     </Style>
-    <!--ScrollViewer样式-->
+    <!--  ScrollViewer样式  -->
     <Style x:Key="ScrollViewer.Default" TargetType="{x:Type ScrollViewer}">
-        <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
-        <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
+        <Setter Property="HorizontalScrollBarVisibility" Value="Auto" />
+        <Setter Property="VerticalScrollBarVisibility" Value="Auto" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type ScrollViewer}">
                     <Grid x:Name="Grid" Background="{TemplateBinding Background}">
                         <Grid.ColumnDefinitions>
-                            <ColumnDefinition Width="*" x:Name="leftColumn" />
-                            <ColumnDefinition Width="Auto" x:Name="rightColumn" />
+                            <ColumnDefinition x:Name="leftColumn" Width="*" />
+                            <ColumnDefinition x:Name="rightColumn" Width="Auto" />
                         </Grid.ColumnDefinitions>
                         <Grid.RowDefinitions>
                             <RowDefinition Height="*" />
                             <RowDefinition Height="Auto" />
                         </Grid.RowDefinitions>
-                        <ScrollContentPresenter x:Name="PART_ContentHost" CanContentScroll="{TemplateBinding CanContentScroll}"
-                                                CanHorizontallyScroll="False" CanVerticallyScroll="False" 
-                                                ContentTemplate="{TemplateBinding ContentTemplate}"
-                                                Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}"
-                                                Grid.Row="0" Grid.Column="0" />
+                        <ScrollContentPresenter
+                            x:Name="PART_ContentHost"
+                            Grid.Row="0"
+                            Grid.Column="0"
+                            Margin="{TemplateBinding Padding}"
+                            CanContentScroll="{TemplateBinding CanContentScroll}"
+                            CanHorizontallyScroll="False"
+                            CanVerticallyScroll="False"
+                            Content="{TemplateBinding Content}"
+                            ContentTemplate="{TemplateBinding ContentTemplate}" />
                         <!--<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}"
-                                                CanHorizontallyScroll="False" CanVerticallyScroll="False" 
+                                                CanHorizontallyScroll="False" CanVerticallyScroll="False"
                                                 ContentTemplate="{TemplateBinding ContentTemplate}"
                                                 Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}"
                                                 Grid.Row="0" Grid.Column="0" />-->
-                        <!--垂直滚动条 -->
-                        <ScrollBar x:Name="PART_VerticalScrollBar" AutomationProperties.AutomationId="VerticalScrollBar"
-                                   ViewportSize="{TemplateBinding ViewportHeight}"
-                                   Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}"
-                                   Minimum="0" Grid.Row="0" 
-                                   Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
-                                   Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
-                                   Style="{DynamicResource DefaultScrollBar}"/>
-                        <!--水平底部滚动条-->
-                        <ScrollBar x:Name="PART_HorizontalScrollBar" 
-                                   AutomationProperties.AutomationId="HorizontalScrollBar"
-                                   Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}"
-                                   Minimum="0" Orientation="Horizontal" Grid.Row="1"
-                                   Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
-                                   Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
-                                   ViewportSize="{TemplateBinding ViewportWidth}" 
-                                   Style="{DynamicResource DefaultScrollBar}"/>
+                        <!--  垂直滚动条  -->
+                        <ScrollBar
+                            x:Name="PART_VerticalScrollBar"
+                            Grid.Row="0"
+                            Grid.Column="1"
+                            AutomationProperties.AutomationId="VerticalScrollBar"
+                            Cursor="Arrow"
+                            Maximum="{TemplateBinding ScrollableHeight}"
+                            Minimum="0"
+                            Style="{DynamicResource DefaultScrollBar}"
+                            ViewportSize="{TemplateBinding ViewportHeight}"
+                            Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
+                            Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
+                        <!--  水平底部滚动条  -->
+                        <ScrollBar
+                            x:Name="PART_HorizontalScrollBar"
+                            Grid.Row="1"
+                            Grid.Column="0"
+                            AutomationProperties.AutomationId="HorizontalScrollBar"
+                            Cursor="Arrow"
+                            Maximum="{TemplateBinding ScrollableWidth}"
+                            Minimum="0"
+                            Orientation="Horizontal"
+                            Style="{DynamicResource DefaultScrollBar}"
+                            ViewportSize="{TemplateBinding ViewportWidth}"
+                            Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
+                            Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
                     </Grid>
                 </ControlTemplate>
             </Setter.Value>

+ 22 - 21
SKMC.UI/Styles/TapItem.xaml

@@ -1,34 +1,35 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-    
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+
     <Style x:Key="TapItem.Primary" TargetType="{x:Type TabItem}">
-        <Setter Property="Background" Value="{DynamicResource Brush.PreviewBackground}"/>
-        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Callout}"/>
+        <Setter Property="Background" Value="{DynamicResource Brush.PreviewBackground}" />
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Callout}" />
         <!--<Setter Property="Padding" Value="1"/>-->
-        <Setter Property="BorderThickness" Value="0"/>
+        <Setter Property="BorderThickness" Value="0" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type TabItem}">
-                    <Border Name="Border"
-                            Background="{TemplateBinding Background}" 
-                            BorderBrush="{TemplateBinding BorderBrush}" 
-                            BorderThickness="{TemplateBinding BorderThickness}"
-                            Cursor="Hand">
-                        <ContentPresenter Name="ContentSite"
-                                          VerticalAlignment="Center"
-                                          HorizontalAlignment="Center"
-                                          ContentSource="Header"
-                                          Margin="10 5 10 5"/>
+                    <Border
+                        Name="Border"
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        Cursor="Hand">
+                        <ContentPresenter
+                            Name="ContentSite"
+                            Margin="10,5,10,5"
+                            HorizontalAlignment="Center"
+                            VerticalAlignment="Center"
+                            ContentSource="Header" />
                     </Border>
-                    
+
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsSelected" Value="True">
-                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource Brush.SelectionSelectedBackground}"/>
+                            <Setter TargetName="Border" Property="Background" Value="{DynamicResource Brush.SelectionSelectedBackground}" />
                         </Trigger>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter Property="Foreground" Value="{DynamicResource Brush.Signature}"/>
+                            <Setter Property="Foreground" Value="{DynamicResource Brush.Signature}" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>

+ 85 - 87
SKMC.UI/Styles/TextBox.xaml

@@ -1,34 +1,36 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-                    xmlns:c="clr-namespace:SKMC.UI.CustomControls">
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:c="clr-namespace:SKMC.UI.CustomControls">
     <ResourceDictionary.MergedDictionaries>
-        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Brushes.xaml"/>
+        <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Assets/Brushes.xaml" />
     </ResourceDictionary.MergedDictionaries>
-    <!--主要输入文本框-->
+    <!--  主要输入文本框  -->
     <Style x:Key="TextBox.Primary" TargetType="{x:Type c:SKTextBox}">
         <Style.Setters>
-            <Setter Property="VerticalContentAlignment" Value="Center"/>
-            <Setter Property="VerticalAlignment" Value="Stretch"/>
-            <Setter Property="HorizontalAlignment" Value="Stretch"/>
-            <Setter Property="BorderThickness" Value="1"/>
-            <Setter Property="FontSize" Value="12"/>
-            <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-            <Setter Property="IconSize" Value="10"/>
+            <Setter Property="VerticalContentAlignment" Value="Center" />
+            <Setter Property="VerticalAlignment" Value="Stretch" />
+            <Setter Property="HorizontalAlignment" Value="Stretch" />
+            <Setter Property="BorderThickness" Value="1" />
+            <Setter Property="FontSize" Value="12" />
+            <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+            <Setter Property="IconSize" Value="10" />
             <Setter Property="Template">
                 <Setter.Value>
                     <ControlTemplate TargetType="{x:Type c:SKTextBox}">
-                        <Border BorderThickness="{TemplateBinding BorderThickness}"
-						        Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
-						        CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}}"
-                                x:Name="boder">
+                        <Border
+                            x:Name="boder"
+                            Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
+                            BorderThickness="{TemplateBinding BorderThickness}"
+                            CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}}">
                             <FrameworkElement.Style>
                                 <Style TargetType="{x:Type Border}">
                                     <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}" />
                                     <Style.Triggers>
-                                        <DataTrigger Value="True" Binding="{Binding IsFocused, ElementName=TextBox}">
+                                        <DataTrigger Binding="{Binding IsFocused, ElementName=TextBox}" Value="True">
                                             <Setter Property="BorderBrush" Value="{DynamicResource Brush.Signature}" />
                                         </DataTrigger>
-                                        <DataTrigger Value="False" Binding="{Binding IsEnabled, ElementName=TextBox}">
+                                        <DataTrigger Binding="{Binding IsEnabled, ElementName=TextBox}" Value="False">
                                             <Setter Property="BorderBrush" Value="{DynamicResource Brush.IconInactive}" />
                                         </DataTrigger>
                                     </Style.Triggers>
@@ -40,65 +42,61 @@
                                     <ColumnDefinition Width="*" />
                                     <ColumnDefinition Width="Auto" />
                                 </Grid.ColumnDefinitions>
-                                <Path Grid.Column="0"
-                                      Data="{TemplateBinding Icon}" 
-                                      Width="{TemplateBinding IconSize}"
-                                      Height="{TemplateBinding IconSize}"
-                                      Stretch="Uniform"
-                                      Fill="{TemplateBinding Foreground}"
-                                      VerticalAlignment="Center"
-                                      HorizontalAlignment="Center"
-                                      Margin="5">
+                                <Path
+                                    Grid.Column="0"
+                                    Width="{TemplateBinding IconSize}"
+                                    Height="{TemplateBinding IconSize}"
+                                    Margin="5"
+                                    HorizontalAlignment="Center"
+                                    VerticalAlignment="Center"
+                                    Data="{TemplateBinding Icon}"
+                                    Fill="{TemplateBinding Foreground}"
+                                    Stretch="Uniform">
                                     <FrameworkElement.Style>
                                         <Style TargetType="{x:Type Path}">
                                             <Style.Triggers>
-                                                <DataTrigger Binding="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}}"
-												             Value="{x:Null}">
+                                                <DataTrigger Binding="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}}" Value="{x:Null}">
                                                     <Setter Property="Visibility" Value="Collapsed" />
                                                 </DataTrigger>
-                                                <DataTrigger Value="" Binding="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}}">
+                                                <DataTrigger Binding="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}}" Value="">
                                                     <Setter Property="Visibility" Value="Collapsed" />
                                                 </DataTrigger>
                                             </Style.Triggers>
                                         </Style>
                                     </FrameworkElement.Style>
                                 </Path>
-                                <!--输入框-->
+                                <!--  输入框  -->
                                 <TextBox
-								    Name="TextBox"
-								    Grid.Column="1"
-                                    VerticalAlignment="Stretch"
+                                    Name="TextBox"
+                                    Grid.Column="1"
                                     HorizontalAlignment="Stretch"
-								    Background="Transparent"
-                                    CaretBrush="{TemplateBinding Foreground}"
-								    FontSize="{TemplateBinding FontSize}"
-								    SelectionBrush="{DynamicResource Brush.Border}"
+                                    VerticalAlignment="Stretch"
+                                    HorizontalContentAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}}"
                                     VerticalContentAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource TemplatedParent}}"
-								    HorizontalContentAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}}"
-								    Foreground="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}"
-								    Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-								    TextWrapping="{Binding TextWrapping, RelativeSource={RelativeSource TemplatedParent}}"
                                     AcceptsReturn="{Binding AcceptsReturn, RelativeSource={RelativeSource TemplatedParent}}"
+                                    Background="Transparent"
+                                    CaretBrush="{TemplateBinding Foreground}"
+                                    FontSize="{TemplateBinding FontSize}"
+                                    Foreground="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}"
+                                    SelectionBrush="{DynamicResource Brush.Border}"
+                                    Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                    TextWrapping="{Binding TextWrapping, RelativeSource={RelativeSource TemplatedParent}}"
                                     ToolTip="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}">
                                     <FrameworkElement.Style>
                                         <Style TargetType="{x:Type TextBox}">
-                                            <Setter Property="BorderThickness" Value="0"/>
+                                            <Setter Property="BorderThickness" Value="0" />
                                             <Setter Property="TextBoxBase.CaretBrush" Value="{DynamicResource Brush.Text}" />
-                                            <Setter Property="Padding" Value="4,0,0,0"/>
-                                            <Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
-                                            <Setter Property="VerticalAlignment" Value="Center"/>
+                                            <Setter Property="Padding" Value="4,0,0,0" />
+                                            <Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
+                                            <Setter Property="VerticalAlignment" Value="Center" />
                                             <Style.Triggers>
-                                                <DataTrigger
-												            Value="Wrap"
-												            Binding="{Binding TextWrapping, RelativeSource={RelativeSource TemplatedParent}}">
+                                                <DataTrigger Binding="{Binding TextWrapping, RelativeSource={RelativeSource TemplatedParent}}" Value="Wrap">
                                                     <Setter Property="TextBoxBase.AcceptsReturn" Value="True" />
                                                 </DataTrigger>
-                                                <DataTrigger
-												            Value="WrapWithOverflow"
-												            Binding="{Binding TextWrapping, RelativeSource={RelativeSource TemplatedParent}}">
+                                                <DataTrigger Binding="{Binding TextWrapping, RelativeSource={RelativeSource TemplatedParent}}" Value="WrapWithOverflow">
                                                     <Setter Property="TextBoxBase.AcceptsReturn" Value="True" />
                                                 </DataTrigger>
-                                                <DataTrigger Value="NoWrap" Binding="{Binding TextWrapping, RelativeSource={RelativeSource TemplatedParent}}">
+                                                <DataTrigger Binding="{Binding TextWrapping, RelativeSource={RelativeSource TemplatedParent}}" Value="NoWrap">
                                                     <Setter Property="TextBoxBase.AcceptsReturn" Value="False" />
                                                 </DataTrigger>
                                                 <!--<DataTrigger Binding="{Binding Unit, RelativeSource={RelativeSource TemplatedParent}}" Value="{x:Null}">
@@ -111,26 +109,25 @@
                                         </Style>
                                     </FrameworkElement.Style>
                                 </TextBox>
-                                <!--单位-->
+                                <!--  单位  -->
                                 <Label
-								    Grid.Column="2"
-								    Foreground="{DynamicResource Brush.Label}"
-								    Content="{Binding Unit, RelativeSource={RelativeSource TemplatedParent}}"
-                                    FontSize="{TemplateBinding UnitSize}"
+                                    Grid.Column="2"
+                                    HorizontalAlignment="Right"
                                     VerticalAlignment="Bottom"
-                                    HorizontalAlignment="Right">
+                                    Content="{Binding Unit, RelativeSource={RelativeSource TemplatedParent}}"
+                                    FontSize="{TemplateBinding UnitSize}"
+                                    Foreground="{DynamicResource Brush.Label}">
                                     <FrameworkElement.Style>
                                         <Style TargetType="{x:Type Label}">
-                                            <Setter Property="VerticalAlignment" Value="Bottom"/>
-                                            <Setter Property="HorizontalAlignment" Value="Right"/>
-                                            <Setter Property="Background" Value="Transparent"/>
-                                            <Setter Property="BorderThickness" Value="0"/>
+                                            <Setter Property="VerticalAlignment" Value="Bottom" />
+                                            <Setter Property="HorizontalAlignment" Value="Right" />
+                                            <Setter Property="Background" Value="Transparent" />
+                                            <Setter Property="BorderThickness" Value="0" />
                                             <Style.Triggers>
-                                                <DataTrigger Binding="{Binding Unit, RelativeSource={RelativeSource TemplatedParent}}"
-												             Value="{x:Null}">
+                                                <DataTrigger Binding="{Binding Unit, RelativeSource={RelativeSource TemplatedParent}}" Value="{x:Null}">
                                                     <Setter Property="Visibility" Value="Collapsed" />
                                                 </DataTrigger>
-                                                <DataTrigger Value="" Binding="{Binding Unit, RelativeSource={RelativeSource TemplatedParent}}">
+                                                <DataTrigger Binding="{Binding Unit, RelativeSource={RelativeSource TemplatedParent}}" Value="">
                                                     <Setter Property="Visibility" Value="Collapsed" />
                                                 </DataTrigger>
                                             </Style.Triggers>
@@ -141,7 +138,7 @@
                         </Border>
                         <ControlTemplate.Triggers>
                             <Trigger Property="Validation.HasError" Value="True">
-                                <Setter TargetName="boder" Property="BorderBrush" Value="{StaticResource Brush.Error}"/>
+                                <Setter TargetName="boder" Property="BorderBrush" Value="{StaticResource Brush.Error}" />
                             </Trigger>
                         </ControlTemplate.Triggers>
                     </ControlTemplate>
@@ -149,34 +146,35 @@
             </Setter>
         </Style.Setters>
     </Style>
-    <!-- 简单水印样式 -->
+    <!--  简单水印样式  -->
     <Style x:Key="TextBox.SimpleWatermark" TargetType="{x:Type TextBox}">
-        <Setter Property="BorderThickness" Value="0.5"/>
-        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}"/>
-        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}"/>
+        <Setter Property="BorderThickness" Value="0.5" />
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}" />
+        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}" />
+        <Setter Property="CaretBrush" Value="{DynamicResource Brush.Text}"/>
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type TextBox}">
                     <Grid>
-                        <ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center"/>
-                        <Border BorderThickness="{TemplateBinding BorderThickness}"
-                                BorderBrush="{TemplateBinding BorderBrush}">
-                            <TextBlock Text="{TemplateBinding Tag}" 
-                                       Foreground="{DynamicResource Brush.Text}" 
-                                       VerticalAlignment="Center"
-                                       IsHitTestVisible="False"
-                                       Margin="5,0,0,0"
-                                       Padding="0"
-                                       Opacity="0.5"
-                                       x:Name="mark">
+                        <ScrollViewer x:Name="PART_ContentHost" VerticalAlignment="Center" />
+                        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
+                            <TextBlock
+                                x:Name="mark"
+                                Margin="5,0,0,0"
+                                Padding="0"
+                                VerticalAlignment="Center"
+                                Foreground="{DynamicResource Brush.Text}"
+                                IsHitTestVisible="False"
+                                Opacity="0.5"
+                                Text="{TemplateBinding Tag}">
                                 <TextBlock.Style>
                                     <Style TargetType="TextBlock">
-                                        <Setter Property="Visibility" Value="Collapsed"/>
+                                        <Setter Property="Visibility" Value="Collapsed" />
                                         <Style.Triggers>
                                             <DataTrigger Binding="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}}" Value="">
-                                                <Setter Property="Visibility" Value="Visible"/>
+                                                <Setter Property="Visibility" Value="Visible" />
                                             </DataTrigger>
                                         </Style.Triggers>
                                     </Style>
@@ -186,7 +184,7 @@
                     </Grid>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsSelectionActive" Value="True">
-                            <Setter TargetName="mark" Property="Visibility" Value="Hidden"/>
+                            <Setter TargetName="mark" Property="Visibility" Value="Hidden" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>

+ 108 - 95
SKMC.UI/Styles/ToggleButton.xaml

@@ -1,41 +1,43 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-    <!--基础按钮-->
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+    <!--  基础按钮  -->
     <Style x:Key="ToggleButton.Base" TargetType="{x:Type ToggleButton}">
-        <Setter Property="HorizontalContentAlignment" Value="Center"/>
-        <Setter Property="VerticalContentAlignment" Value="Center"/>
-        <Setter Property="Width" Value="100"/>
-        <Setter Property="Height" Value="40"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-        <Setter Property="Background" Value="{DynamicResource Brush.Neutral}"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}"/>
-        <Setter Property="Cursor" Value="Hand"/>
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="Width" Value="100" />
+        <Setter Property="Height" Value="40" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+        <Setter Property="Background" Value="{DynamicResource Brush.Neutral}" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}" />
+        <Setter Property="Cursor" Value="Hand" />
     </Style>
-    <!--主要按钮-->
-    <Style x:Key="ToggleButton.Primary" 
-           TargetType="{x:Type ToggleButton}" 
-           BasedOn="{StaticResource ToggleButton.Base}">
-        <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButton}"/>
+    <!--  主要按钮  -->
+    <Style
+        x:Key="ToggleButton.Primary"
+        BasedOn="{StaticResource ToggleButton.Base}"
+        TargetType="{x:Type ToggleButton}">
+        <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButton}" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type ToggleButton}">
-                    <Border Background="{TemplateBinding Background}"
-                            BorderThickness="{TemplateBinding BorderThickness}"
-                            BorderBrush="{TemplateBinding BorderBrush}">
-                        <ContentPresenter Content="{TemplateBinding Content}"
-                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
-                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+                    <Border
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}">
+                        <ContentPresenter
+                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                            Content="{TemplateBinding Content}" />
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButtonPressed}"/>
+                            <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButtonPressed}" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="True">
-                            <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButtonMouseOver}"/>
+                            <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButtonMouseOver}" />
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="False">
-                            <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButtonDisabled}"/>
+                            <Setter Property="Background" Value="{DynamicResource Brush.PrimaryButtonDisabled}" />
                             <!--<Setter Property="Foreground" Value="{DynamicResource Brush.TextInactive}"/>-->
                         </Trigger>
                     </ControlTemplate.Triggers>
@@ -43,123 +45,134 @@
             </Setter.Value>
         </Setter>
     </Style>
-    <!--简单照明灯开关-->
+    <!--  简单照明灯开关  -->
     <Style x:Key="ToggleButton.SimpleLamp" TargetType="{x:Type ToggleButton}">
-        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}"/>
-        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}"/>
-        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}"/>
-        <Setter Property="BorderThickness" Value="1"/>
-        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}"/>
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="HorizontalContentAlignment" Value="Center"/>
-        <Setter Property="VerticalContentAlignment" Value="Center"/>
-        <Setter Property="Cursor" Value="Hand"/>
+        <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}" />
+        <Setter Property="FontSize" Value="{DynamicResource FontSize.Body}" />
+        <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+        <Setter Property="BorderThickness" Value="1" />
+        <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}" />
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="HorizontalContentAlignment" Value="Center" />
+        <Setter Property="VerticalContentAlignment" Value="Center" />
+        <Setter Property="Cursor" Value="Hand" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type ToggleButton}">
-                    <Border Background="{TemplateBinding Background}"
-                            BorderBrush="{TemplateBinding BorderBrush}"
-                            BorderThickness="{TemplateBinding BorderThickness}">
+                    <Border
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}">
                         <Grid>
                             <Grid.ColumnDefinitions>
-                                <ColumnDefinition Width="0.3*"/>
-                                <ColumnDefinition Width="*"/>
+                                <ColumnDefinition Width="0.3*" />
+                                <ColumnDefinition Width="*" />
                             </Grid.ColumnDefinitions>
-                            <Path x:Name="light"
-                                  Width="{TemplateBinding FontSize}"
-                                  Height="{TemplateBinding FontSize}"
-                                  VerticalAlignment="Center"
-                                  HorizontalAlignment="Center"
-                                  Stretch="Uniform"/>
-                            <ContentPresenter Grid.Column="1" Content="{TemplateBinding Content}"
-                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
-                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+                            <Path
+                                x:Name="light"
+                                Width="{TemplateBinding FontSize}"
+                                Height="{TemplateBinding FontSize}"
+                                HorizontalAlignment="Center"
+                                VerticalAlignment="Center"
+                                Stretch="Uniform" />
+                            <ContentPresenter
+                                Grid.Column="1"
+                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
+                                Content="{TemplateBinding Content}" />
                         </Grid>
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsChecked" Value="True">
-                            <Setter TargetName="light" Property="Data" Value="{DynamicResource Icon.CameraLightOn}"/>
-                            <Setter TargetName="light" Property="Fill" Value="{DynamicResource Brush.RgbGreen}"/>
+                            <Setter TargetName="light" Property="Data" Value="{DynamicResource Icon.CameraLightOn}" />
+                            <Setter TargetName="light" Property="Fill" Value="{DynamicResource Brush.RgbGreen}" />
                         </Trigger>
                         <Trigger Property="IsChecked" Value="False">
-                            <Setter TargetName="light" Property="Data" Value="{DynamicResource Icon.CameraLightOff}"/>
-                            <Setter TargetName="light" Property="Fill" Value="{DynamicResource Brush.RgbRed}"/>
+                            <Setter TargetName="light" Property="Data" Value="{DynamicResource Icon.CameraLightOff}" />
+                            <Setter TargetName="light" Property="Fill" Value="{DynamicResource Brush.RgbRed}" />
                         </Trigger>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter Property="Foreground" Value="{DynamicResource Brush.SelectionSelected}"/>
-                            <Setter Property="BorderBrush" Value="{DynamicResource Brush.ButtonHover}"/>
+                            <Setter Property="Foreground" Value="{DynamicResource Brush.SelectionSelected}" />
+                            <Setter Property="BorderBrush" Value="{DynamicResource Brush.ButtonHover}" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="True">
-                            <Setter Property="Background" Value="{DynamicResource Brush.ButtonPressed}"/>
+                            <Setter Property="Background" Value="{DynamicResource Brush.ButtonPressed}" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
     </Style>
-    <!--简单安全门锁-->
+    <!--  简单安全门锁  -->
     <Style x:Key="ToggleButton.SimpleLocker" TargetType="{x:Type ToggleButton}">
-        <Setter Property="Cursor" Value="Hand"/>
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="Width" Value="45"/>
-        <Setter Property="Height" Value="45"/>
+        <Setter Property="Cursor" Value="Hand" />
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Width" Value="45" />
+        <Setter Property="Height" Value="45" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type ToggleButton}">
-                    <Border BorderBrush="{TemplateBinding BorderBrush}"
-                            Background="{TemplateBinding Background}"
-                            BorderThickness="{TemplateBinding BorderThickness}">
-                        <Path Width="{TemplateBinding FontSize}"
-                              Height="{TemplateBinding FontSize}"
-                              Stretch="Uniform"
-                              x:Name="locker"
-                              Margin="5"/>
+                    <Border
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}">
+                        <Path
+                            x:Name="locker"
+                            Width="{TemplateBinding FontSize}"
+                            Height="{TemplateBinding FontSize}"
+                            Margin="5"
+                            Stretch="Uniform" />
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsChecked" Value="False">
-                            <Setter TargetName="locker" Property="Data" Value="{DynamicResource Icon.LockDoor}"/>
-                            <Setter TargetName="locker" Property="Fill" Value="{DynamicResource Brush.RgbGreen}"/>
-                            <Setter Property="BorderBrush" Value="{DynamicResource Brush.RgbGreen}"/>
+                            <Setter TargetName="locker" Property="Data" Value="{DynamicResource Icon.LockDoor}" />
+                            <Setter TargetName="locker" Property="Fill" Value="{DynamicResource Brush.RgbGreen}" />
+                            <Setter Property="BorderBrush" Value="{DynamicResource Brush.RgbGreen}" />
                         </Trigger>
                         <Trigger Property="IsChecked" Value="True">
-                            <Setter TargetName="locker" Property="Data" Value="{DynamicResource Icon.UnlockDoor}"/>
-                            <Setter TargetName="locker" Property="Fill" Value="{DynamicResource Brush.RgbRed}"/>
-                            <Setter Property="BorderBrush" Value="{DynamicResource Brush.RgbRed}"/>
+                            <Setter TargetName="locker" Property="Data" Value="{DynamicResource Icon.UnlockDoor}" />
+                            <Setter TargetName="locker" Property="Fill" Value="{DynamicResource Brush.RgbRed}" />
+                            <Setter Property="BorderBrush" Value="{DynamicResource Brush.RgbRed}" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
             </Setter.Value>
         </Setter>
     </Style>
-    <!--主题切换按钮-->
-    <Style x:Key="ToggleButton.ThemeSwitch" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource ToggleButton.Base}">
-        <Setter Property="Background" Value="Transparent"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="Width" Value="45"/>
-        <Setter Property="Height" Value="45"/>
+    <!--  主题切换按钮  -->
+    <Style
+        x:Key="ToggleButton.ThemeSwitch"
+        BasedOn="{StaticResource ToggleButton.Base}"
+        TargetType="{x:Type ToggleButton}">
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="BorderThickness" Value="0" />
+        <Setter Property="Width" Value="45" />
+        <Setter Property="Height" Value="45" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type ToggleButton}">
-                    <Border BorderBrush="{TemplateBinding BorderBrush}"
-                            Background="{TemplateBinding Background}"
-                            BorderThickness="{TemplateBinding BorderThickness}">
-                        <Path Width="{TemplateBinding FontSize}"
-                              Height="{TemplateBinding FontSize}"
-                              Stretch="Uniform"
-                              x:Name="theme"
-                              Margin="5"/>
+                    <Border
+                        Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}">
+                        <Path
+                            x:Name="theme"
+                            Width="{TemplateBinding FontSize}"
+                            Height="{TemplateBinding FontSize}"
+                            Margin="5"
+                            Stretch="Uniform" />
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsChecked" Value="False">
-                            <Setter TargetName="theme" Property="Data" Value="{DynamicResource Icon.Sun}"/>
-                            <Setter TargetName="theme" Property="Fill" Value="{DynamicResource Brush.Text}"/>
+                            <Setter TargetName="theme" Property="Data" Value="{DynamicResource Icon.Sun}" />
+                            <Setter TargetName="theme" Property="Fill" Value="{DynamicResource Brush.Text}" />
                         </Trigger>
                         <Trigger Property="IsChecked" Value="True">
-                            <Setter TargetName="theme" Property="Data" Value="{DynamicResource Icon.Moon}"/>
-                            <Setter TargetName="theme" Property="Fill" Value="{DynamicResource Brush.Text}"/>
+                            <Setter TargetName="theme" Property="Data" Value="{DynamicResource Icon.Moon}" />
+                            <Setter TargetName="theme" Property="Fill" Value="{DynamicResource Brush.Text}" />
                         </Trigger>
                         <Trigger Property="IsMouseOver" Value="True">
-                            <Setter Property="Background" Value="{DynamicResource Brush.ButtonHover}"/>
+                            <Setter Property="Background" Value="{DynamicResource Brush.ButtonHover}" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>

+ 8 - 0
SKMC.UI/Themes/Dark.xaml

@@ -72,6 +72,14 @@
         Opacity="0.3"
         Color="{DynamicResource Color.Border}" />
 
+    <SolidColorBrush x:Key="Brush.ChartBackground" Color="{DynamicResource Color.DarkBackground}" />
+    <SolidColorBrush x:Key="Brush.ChartLine0" Color="{DynamicResource Color.DebugLog}" />
+    <SolidColorBrush x:Key="Brush.ChartLine1" Color="{DynamicResource Color.RgbGreen}" />
+    <SolidColorBrush x:Key="Brush.ChartLine2" Color="{DynamicResource Color.LockDoors}" />
+    <SolidColorBrush x:Key="Brush.ChartLine3" Color="{DynamicResource Color.Ruler}" />
+
+    <SolidColorBrush x:Key="Brush.MotionIO.TypeDo" Color="{DynamicResource Color.Stop}" />
+    <SolidColorBrush x:Key="Brush.MotionIO.TypeDi" Color="{DynamicResource Color.HomePosition}" />
     <SolidColorBrush x:Key="Brush.MotionIO.Default" Color="{DynamicResource Color.DashboardBackground}" />
     <SolidColorBrush x:Key="Brush.MotionIO.Actived" Color="{DynamicResource Color.Good}" />
 

+ 9 - 0
SKMC.UI/Themes/Light.xaml

@@ -80,9 +80,18 @@
         Opacity="0.5"
         Color="{DynamicResource Color.SignatureLight}" />
 
+    <SolidColorBrush x:Key="Brush.ChartBackground" Color="{DynamicResource Color.DarkBackground}" />
+    <SolidColorBrush x:Key="Brush.ChartLine0" Color="{DynamicResource Color.DarkBlue}" />
+    <SolidColorBrush x:Key="Brush.ChartLine1" Color="{DynamicResource Color.DrawCross}" />
+    <SolidColorBrush x:Key="Brush.ChartLine2" Color="{DynamicResource Color.LockDoors}" />
+    <SolidColorBrush x:Key="Brush.ChartLine3" Color="{DynamicResource Color.Ruler}" />
+
+    <SolidColorBrush x:Key="Brush.MotionIO.TypeDo" Color="{DynamicResource Color.Stop}" />
+    <SolidColorBrush x:Key="Brush.MotionIO.TypeDi" Color="{DynamicResource Color.HomePosition}" />
     <SolidColorBrush x:Key="Brush.MotionIO.Default" Color="{DynamicResource Color.DashboardBackground}" />
     <SolidColorBrush x:Key="Brush.MotionIO.Actived" Color="{DynamicResource Color.DrawCross}" />
 
+
     <SolidColorBrush x:Key="Brush.Signature" Color="{DynamicResource Color.Signature}" />
     <SolidColorBrush x:Key="Brush.SignatureLight" Color="{DynamicResource Color.SignatureLight}" />
     <SolidColorBrush x:Key="Brush.SignatureDark" Color="{DynamicResource Color.SignatureDark}" />

+ 2 - 2
SKMC.UI/UserControls/NumpadControl.xaml

@@ -154,12 +154,12 @@
 
         <!-- 输入框 -->
         <c:SKTextBox x:Name="InputTextBox" Grid.Row="1" 
-                     FontSize="28" Height="50" 
+                     FontSize="{StaticResource FontSize.Headline}" Height="50" 
                      VerticalContentAlignment="Center"
                      TextAlignment="Right"
                      Margin="0,0,0,15"
                      IsReadOnly="True"
-                     UnitSize="20"
+                     UnitSize="{StaticResource FontSize.Body}"
                      Style="{StaticResource TextBox.Primary}"/>
 
         <!-- 数字键盘 -->

Някои файлове не бяха показани, защото твърде много файлове са промени