|
|
@ -1,98 +1,38 @@ |
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes" |
|
|
xmlns:chrome="clr-namespace:Microsoft.Windows.Controls.Chromes" |
|
|
xmlns:local="clr-namespace:Microsoft.Windows.Controls" > |
|
|
xmlns:local="clr-namespace:Microsoft.Windows.Controls" |
|
|
|
|
|
xmlns:themes="clr-namespace:Microsoft.Windows.Controls.Themes"> |
|
|
|
|
|
|
|
|
<!-- =============================================================================== --> |
|
|
<!-- =============================================================================== --> |
|
|
<!-- ButtonChrome --> |
|
|
<!-- ButtonChrome --> |
|
|
<!-- =============================================================================== --> |
|
|
<!-- =============================================================================== --> |
|
|
|
|
|
|
|
|
<CornerRadius x:Key="ControlOuterBorderCornerRadius">2.75</CornerRadius> |
|
|
|
|
|
<CornerRadius x:Key="ControlInnerBorderCornerRadius">1.75</CornerRadius> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Normal --> |
|
|
|
|
|
<SolidColorBrush x:Key="ControlOuterBorder_Normal" Color="#FF707070" /> |
|
|
|
|
|
<LinearGradientBrush x:Key="ControlInnerBorder_Normal" EndPoint="0,1" StartPoint="0,0"> |
|
|
|
|
|
<GradientStop Color="#FAFFFFFF" Offset="0"/> |
|
|
|
|
|
<GradientStop Color="#85FFFFFF" Offset="1"/> |
|
|
|
|
|
</LinearGradientBrush> |
|
|
|
|
|
<LinearGradientBrush x:Key="ControlBackground_Normal" EndPoint="0,1" StartPoint="0,0"> |
|
|
|
|
|
<GradientStop Color="#F3F3F3" Offset="0"/> |
|
|
|
|
|
<GradientStop Color="#EBEBEB" Offset="0.5"/> |
|
|
|
|
|
<GradientStop Color="#DDDDDD" Offset="0.5"/> |
|
|
|
|
|
<GradientStop Color="#CDCDCD" Offset="1"/> |
|
|
|
|
|
</LinearGradientBrush> |
|
|
|
|
|
|
|
|
|
|
|
<!--Mouse Over--> |
|
|
|
|
|
<SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#3C7FB1" /> |
|
|
|
|
|
<LinearGradientBrush x:Key="ControlInnerBorder_MouseOver" EndPoint="0,1" StartPoint="0,0"> |
|
|
|
|
|
<GradientStop Color="#FAFFFFFF" Offset="0"/> |
|
|
|
|
|
<GradientStop Color="#85FFFFFF" Offset="1"/> |
|
|
|
|
|
</LinearGradientBrush> |
|
|
|
|
|
<LinearGradientBrush x:Key="ControlBackground_MouseOver" EndPoint="0,1" StartPoint="0,0"> |
|
|
|
|
|
<GradientStop Color="#FFEAF6FD" Offset="0"/> |
|
|
|
|
|
<GradientStop Color="#FFD9F0FC" Offset="0.50"/> |
|
|
|
|
|
<GradientStop Color="#FFBEE6FD" Offset="0.50"/> |
|
|
|
|
|
<GradientStop Color="#FFA7D9F5" Offset="1"/> |
|
|
|
|
|
</LinearGradientBrush> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Pressed --> |
|
|
|
|
|
<SolidColorBrush x:Key="ControlOuterBorder_Pressed" Color="#2C628B" /> |
|
|
|
|
|
<LinearGradientBrush x:Key="ControlInnerBorder_Pressed" EndPoint="0,1" StartPoint="0,0"> |
|
|
|
|
|
<GradientStop Color="#FAFFFFFF" Offset="0"/> |
|
|
|
|
|
<GradientStop Color="#85FFFFFF" Offset="1"/> |
|
|
|
|
|
</LinearGradientBrush> |
|
|
|
|
|
<LinearGradientBrush x:Key="ControlBackground_Pressed" EndPoint="0,1" StartPoint="0,0"> |
|
|
|
|
|
<GradientStop Color="#C2E4F6" Offset="0.5"/> |
|
|
|
|
|
<GradientStop Color="#ABDAF3" Offset="0.5"/> |
|
|
|
|
|
<GradientStop Color="#90CBEB" Offset="1"/> |
|
|
|
|
|
</LinearGradientBrush> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Focused --> |
|
|
|
|
|
<SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FF707070" /> |
|
|
|
|
|
<SolidColorBrush x:Key="ControlInnerBorder_Focused" Color="#F900CCFF" /> |
|
|
|
|
|
<LinearGradientBrush x:Key="ControlBackground_Focused" EndPoint="0,1" StartPoint="0,0"> |
|
|
|
|
|
<GradientStop Color="#FFEAF6FD" Offset="0"/> |
|
|
|
|
|
<GradientStop Color="#FFD9F0FC" Offset="0.50"/> |
|
|
|
|
|
<GradientStop Color="#FFBEE6FD" Offset="0.50"/> |
|
|
|
|
|
<GradientStop Color="#FFA7D9F5" Offset="1"/> |
|
|
|
|
|
</LinearGradientBrush> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Disabled --> |
|
|
|
|
|
<SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#ADB2B5" /> |
|
|
|
|
|
<LinearGradientBrush x:Key="ControlInnerBorder_Disabled" EndPoint="0,1" StartPoint="0,0"> |
|
|
|
|
|
<GradientStop Color="#FAFFFFFF" Offset="0"/> |
|
|
|
|
|
<GradientStop Color="#85FFFFFF" Offset="1"/> |
|
|
|
|
|
</LinearGradientBrush> |
|
|
|
|
|
<SolidColorBrush x:Key="ControlBackground_Disabled" Color="#F4F4F4" /> |
|
|
|
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type chrome:ButtonChrome}"> |
|
|
<Style TargetType="{x:Type chrome:ButtonChrome}"> |
|
|
<Setter Property="IsTabStop" Value="False" /> |
|
|
<Setter Property="IsTabStop" Value="False" /> |
|
|
<Setter Property="SnapsToDevicePixels" Value="True" /> |
|
|
<Setter Property="SnapsToDevicePixels" Value="True" /> |
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" /> |
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" /> |
|
|
<Setter Property="Background" Value="{StaticResource ControlBackground_Normal}" /> |
|
|
<Setter Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalBackgroundKey}}" /> |
|
|
<Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" /> |
|
|
<Setter Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalOuterBorderKey}}" /> |
|
|
<Setter Property="BorderThickness" Value="1" /> |
|
|
<Setter Property="BorderThickness" Value="1" /> |
|
|
<Setter Property="CornerRadius" Value="{StaticResource ControlOuterBorderCornerRadius}" /> |
|
|
|
|
|
<Setter Property="InnerCornerRadius" Value="{StaticResource ControlInnerBorderCornerRadius}" /> |
|
|
|
|
|
<Setter Property="Template"> |
|
|
<Setter Property="Template"> |
|
|
<Setter.Value> |
|
|
<Setter.Value> |
|
|
<ControlTemplate TargetType="{x:Type chrome:ButtonChrome}"> |
|
|
<ControlTemplate TargetType="{x:Type chrome:ButtonChrome}"> |
|
|
<Grid> |
|
|
<Grid> |
|
|
|
|
|
|
|
|
<Border x:Name="OuterBorder" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"> |
|
|
<Border x:Name="OuterBorder" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"> |
|
|
<Border x:Name="InnerBorder" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Normal}" /> |
|
|
<Border x:Name="InnerBorder" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{DynamicResource {x:Static themes:ResourceKeys.ButtonNormalInnerBorderKey}}" /> |
|
|
</Border> |
|
|
</Border> |
|
|
|
|
|
|
|
|
<Border x:Name="MouseOverVisual" Opacity="0" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_MouseOver}" Background="{StaticResource ControlBackground_MouseOver}"> |
|
|
<Border x:Name="MouseOverVisual" Opacity="0" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{DynamicResource {x:Static themes:ResourceKeys.ButtonMouseOverOuterBorderKey}}" Background="{DynamicResource {x:Static themes:ResourceKeys.ButtonMouseOverBackgroundKey}}"> |
|
|
<Border x:Name="MouseOverInnerVisual" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_MouseOver}" /> |
|
|
<Border x:Name="MouseOverInnerVisual" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{DynamicResource {x:Static themes:ResourceKeys.ButtonMouseOverInnerBorderKey}}" /> |
|
|
</Border> |
|
|
</Border> |
|
|
<Border x:Name="PressedVisual" Opacity="0" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Pressed}" Background="{StaticResource ControlBackground_Pressed}"> |
|
|
<Border x:Name="PressedVisual" Opacity="0" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{DynamicResource {x:Static themes:ResourceKeys.ButtonPressedOuterBorderKey}}" Background="{DynamicResource {x:Static themes:ResourceKeys.ButtonPressedBackgroundKey}}"> |
|
|
<Border x:Name="PressedInnerVisual" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Pressed}" /> |
|
|
<Border x:Name="PressedInnerVisual" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{DynamicResource {x:Static themes:ResourceKeys.ButtonPressedInnerBorderKey}}" /> |
|
|
</Border> |
|
|
</Border> |
|
|
|
|
|
|
|
|
<Border x:Name="FocusVisual" Opacity="0" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Focused}" Background="{StaticResource ControlBackground_Focused}"> |
|
|
<Border x:Name="FocusVisual" Opacity="0" Visibility="Collapsed" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{DynamicResource {x:Static themes:ResourceKeys.ButtonFocusedOuterBorderKey}}" Background="{DynamicResource {x:Static themes:ResourceKeys.ButtonFocusedBackgroundKey}}"> |
|
|
<Border x:Name="FocusInnerVisual" BorderThickness="1" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{StaticResource ControlInnerBorder_Focused}" /> |
|
|
<Border x:Name="FocusInnerVisual" BorderThickness="1" CornerRadius="{TemplateBinding InnerCornerRadius}" BorderBrush="{DynamicResource {x:Static themes:ResourceKeys.ButtonFocusedInnerBorderKey}}" /> |
|
|
</Border> |
|
|
</Border> |
|
|
|
|
|
|
|
|
<ContentPresenter Margin="{TemplateBinding Padding}" |
|
|
<ContentPresenter Margin="{TemplateBinding Padding}" |
|
|
@ -111,9 +51,9 @@ |
|
|
<Condition Property="RenderEnabled" Value="False" /> |
|
|
<Condition Property="RenderEnabled" Value="False" /> |
|
|
<Condition Property="RenderChecked" Value="False" /> |
|
|
<Condition Property="RenderChecked" Value="False" /> |
|
|
</MultiTrigger.Conditions> |
|
|
</MultiTrigger.Conditions> |
|
|
<Setter TargetName="OuterBorder" Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Disabled}" /> |
|
|
<Setter TargetName="OuterBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonDisabledOuterBorderKey}}" /> |
|
|
<Setter TargetName="InnerBorder" Property="BorderBrush" Value="{StaticResource ControlInnerBorder_Disabled}" /> |
|
|
<Setter TargetName="InnerBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonInnerBorderDisabledKey}}" /> |
|
|
<Setter TargetName="OuterBorder" Property="Background" Value="{StaticResource ControlBackground_Disabled}" /> |
|
|
<Setter TargetName="OuterBorder" Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ControlDisabledBackgroundKey}}" /> |
|
|
</MultiTrigger> |
|
|
</MultiTrigger> |
|
|
|
|
|
|
|
|
<!-- if button is enabled and pressed --> |
|
|
<!-- if button is enabled and pressed --> |
|
|
@ -206,9 +146,9 @@ |
|
|
<Condition Property="RenderMouseOver" Value="False" /> |
|
|
<Condition Property="RenderMouseOver" Value="False" /> |
|
|
<Condition Property="RenderPressed" Value="False" /> |
|
|
<Condition Property="RenderPressed" Value="False" /> |
|
|
</MultiTrigger.Conditions> |
|
|
</MultiTrigger.Conditions> |
|
|
<Setter TargetName="OuterBorder" Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Pressed}" /> |
|
|
<Setter TargetName="OuterBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonPressedOuterBorderKey}}" /> |
|
|
<Setter TargetName="InnerBorder" Property="BorderBrush" Value="{StaticResource ControlInnerBorder_Pressed}" /> |
|
|
<Setter TargetName="InnerBorder" Property="BorderBrush" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonPressedInnerBorderKey}}" /> |
|
|
<Setter TargetName="OuterBorder" Property="Background" Value="{StaticResource ControlBackground_Pressed}" /> |
|
|
<Setter TargetName="OuterBorder" Property="Background" Value="{DynamicResource {x:Static themes:ResourceKeys.ButtonPressedBackgroundKey}}" /> |
|
|
</MultiTrigger> |
|
|
</MultiTrigger> |
|
|
|
|
|
|
|
|
<!-- if button is focused, is enabled, not pressed, and the mouse is not over --> |
|
|
<!-- if button is focused, is enabled, not pressed, and the mouse is not over --> |
|
|
|