402 lines
27 KiB
XML
402 lines
27 KiB
XML
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:controls="clr-namespace:WPFluent.Controls"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
<!--<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="/WPFluent;component/Themes/Light.xaml"/>
|
|
</ResourceDictionary.MergedDictionaries>-->
|
|
<Thickness x:Key="ButtonPadding">11,5,11,6</Thickness>
|
|
<Thickness x:Key="ButtonBorderThemeThickness">1</Thickness>
|
|
<Thickness x:Key="ButtonIconMargin">0,0,8,0</Thickness>
|
|
|
|
<Style TargetType="{x:Type RepeatButton}" x:Key="DefaultRepeatButtonStyle">
|
|
<!-- Universal WPF UI focus -->
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource DefaultControlFocusVisualStyle}" />
|
|
<!-- Universal WPF UI focus -->
|
|
<Setter Property="Background" Value="{DynamicResource ControlFillColorDefaultBrush}" />
|
|
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{StaticResource ButtonBorderThemeThickness}" />
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="FontWeight" Value="Normal" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="MinHeight" Value="32" />
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
<Border
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding Border.CornerRadius}"
|
|
Height="{TemplateBinding Height}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
MinHeight="{TemplateBinding MinHeight}"
|
|
MinWidth="{TemplateBinding MinWidth}"
|
|
Padding="{TemplateBinding Padding}"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
Width="{TemplateBinding Width}"
|
|
x:Name="ContentBorder">
|
|
<ContentPresenter
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
TextElement.Foreground="{TemplateBinding Foreground}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
x:Name="ContentPresenter" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
<Condition Property="IsPressed" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="Background" TargetName="ContentBorder" Value="{DynamicResource ControlFillColorSecondaryBrush}" />
|
|
<Setter Property="BorderBrush" TargetName="ContentBorder" Value="{DynamicResource ControlElevationBorderBrush}" />
|
|
</MultiTrigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
<Condition Property="IsPressed" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="Background" TargetName="ContentBorder" Value="{DynamicResource ControlFillColorTertiaryBrush}" />
|
|
<Setter Property="BorderBrush" TargetName="ContentBorder" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
|
|
<Setter Property="TextElement.Foreground" TargetName="ContentPresenter" Value="{DynamicResource TextFillColorSecondaryBrush}" />
|
|
</MultiTrigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Background" TargetName="ContentBorder" Value="{DynamicResource ControlFillColorDisabledBrush}" />
|
|
<Setter Property="BorderBrush" TargetName="ContentBorder" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
|
|
<Setter Property="TextElement.Foreground" TargetName="ContentPresenter" Value="{DynamicResource TextFillColorDisabledBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type Button}" x:Key="DefaultButtonStyle">
|
|
<!-- Universal WPF UI focus -->
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource DefaultControlFocusVisualStyle}" />
|
|
<!-- Universal WPF UI focus -->
|
|
<Setter Property="Background" Value="{DynamicResource ControlFillColorDefaultBrush}" />
|
|
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{StaticResource ButtonBorderThemeThickness}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="FontWeight" Value="Normal" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="MinHeight" Value="32" />
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding Border.CornerRadius}"
|
|
Height="{TemplateBinding Height}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
MinHeight="{TemplateBinding MinHeight}"
|
|
MinWidth="{TemplateBinding MinWidth}"
|
|
Padding="{TemplateBinding Padding}"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
Width="{TemplateBinding Width}"
|
|
x:Name="ContentBorder">
|
|
<ContentPresenter
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
TextElement.Foreground="{TemplateBinding Foreground}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
x:Name="ContentPresenter" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
<Condition Property="IsPressed" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="Background" TargetName="ContentBorder" Value="{DynamicResource ControlFillColorSecondaryBrush}" />
|
|
<Setter Property="BorderBrush" TargetName="ContentBorder" Value="{DynamicResource ControlElevationBorderBrush}" />
|
|
</MultiTrigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
<Condition Property="IsPressed" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="Background" TargetName="ContentBorder" Value="{DynamicResource ControlFillColorTertiaryBrush}" />
|
|
<Setter Property="BorderBrush" TargetName="ContentBorder" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
|
|
<Setter Property="TextElement.Foreground" TargetName="ContentPresenter" Value="{DynamicResource TextFillColorSecondaryBrush}" />
|
|
</MultiTrigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Background" TargetName="ContentBorder" Value="{DynamicResource ControlFillColorDisabledBrush}" />
|
|
<Setter Property="BorderBrush" TargetName="ContentBorder" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
|
|
<Setter Property="TextElement.Foreground" TargetName="ContentPresenter" Value="{DynamicResource TextFillColorDisabledBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type controls:Button}" x:Key="DefaultUiButtonStyle">
|
|
<!-- Universal WPF UI focus -->
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource DefaultControlFocusVisualStyle}" />
|
|
<!-- Universal WPF UI focus -->
|
|
<Setter Property="Appearance" Value="Primary" />
|
|
<Setter Property="Background" Value="{DynamicResource ControlFillColorDefaultBrush}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{StaticResource ButtonBorderThemeThickness}" />
|
|
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="FontWeight" Value="Normal" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="MinHeight" Value="32" />
|
|
<Setter Property="MouseOverBackground" Value="{DynamicResource ControlFillColorSecondaryBrush}" />
|
|
<Setter Property="MouseOverBorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Padding" Value="{StaticResource ButtonPadding}" />
|
|
<Setter Property="PressedBackground" Value="{DynamicResource ControlFillColorTertiaryBrush}" />
|
|
<Setter Property="PressedBorderBrush" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
|
|
<Setter Property="PressedForeground" Value="{DynamicResource TextFillColorSecondaryBrush}" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type controls:Button}">
|
|
<Border
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding CornerRadius}"
|
|
Height="{TemplateBinding Height}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
MinHeight="{TemplateBinding MinHeight}"
|
|
MinWidth="{TemplateBinding MinWidth}"
|
|
Padding="{TemplateBinding Padding}"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
Width="{TemplateBinding Width}"
|
|
x:Name="ContentBorder">
|
|
<Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ContentPresenter
|
|
Content="{TemplateBinding Icon}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
Focusable="False"
|
|
Grid.Column="0"
|
|
Margin="{StaticResource ButtonIconMargin}"
|
|
TextElement.FontSize="{TemplateBinding FontSize}"
|
|
TextElement.Foreground="{TemplateBinding Foreground}"
|
|
VerticalAlignment="Center"
|
|
x:Name="ControlIcon" />
|
|
|
|
<ContentPresenter
|
|
Content="{TemplateBinding Content}"
|
|
Grid.Column="1"
|
|
TextElement.Foreground="{TemplateBinding Foreground}"
|
|
VerticalAlignment="Center"
|
|
x:Name="ContentPresenter" />
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
<Condition Property="IsPressed" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="Background" TargetName="ContentBorder" Value="{Binding PressedBackground, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
<Setter Property="BorderBrush" TargetName="ContentBorder" Value="{Binding MouseOverBorderBrush, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
</MultiTrigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
<Condition Property="IsPressed" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="Background" TargetName="ContentBorder" Value="{Binding PressedBackground, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
<Setter Property="BorderBrush" TargetName="ContentBorder" Value="{Binding PressedBorderBrush, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
<Setter Property="TextElement.Foreground" TargetName="ContentPresenter" Value="{Binding PressedForeground, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
<Setter Property="TextElement.Foreground" TargetName="ControlIcon" Value="{Binding PressedForeground, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
</MultiTrigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Background" TargetName="ContentBorder" Value="{DynamicResource ControlFillColorDisabledBrush}" />
|
|
<Setter Property="BorderBrush" TargetName="ContentBorder" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
|
|
<Setter Property="TextElement.Foreground" TargetName="ControlIcon" Value="{DynamicResource TextFillColorDisabledBrush}" />
|
|
<Setter Property="TextElement.Foreground" TargetName="ContentPresenter" Value="{DynamicResource TextFillColorDisabledBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="Content" Value="{x:Null}">
|
|
<Setter Property="Margin" TargetName="ControlIcon" Value="0" />
|
|
</Trigger>
|
|
<Trigger Property="Content" Value="">
|
|
<Setter Property="Margin" TargetName="ControlIcon" Value="0" />
|
|
</Trigger>
|
|
<Trigger Property="Icon" Value="{x:Null}">
|
|
<Setter Property="Margin" TargetName="ControlIcon" Value="0" />
|
|
<Setter Property="Visibility" TargetName="ControlIcon" Value="Collapsed" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Style.Triggers>
|
|
<!-- TRANSPARENT -->
|
|
<Trigger Property="Appearance" Value="Transparent">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
</Trigger>
|
|
|
|
<!-- Accent -->
|
|
<Trigger Property="Appearance" Value="Accent">
|
|
<Setter Property="Background" Value="{DynamicResource AccentFillColorDefaultBrush}" />
|
|
<!--<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />-->
|
|
<Setter Property="Foreground" Value="{DynamicResource TextOnAccentFillColorPrimaryBrush}" />
|
|
<Setter Property="MouseOverBackground" Value="{DynamicResource AccentFillColorSecondaryBrush}" />
|
|
<Setter Property="PressedBackground" Value="{DynamicResource AccentFillColorTertiaryBrush}" />
|
|
<!--<Setter Property="PressedBorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />-->
|
|
<Setter Property="PressedForeground" Value="{DynamicResource TextOnAccentFillColorSecondaryBrush}" />
|
|
</Trigger>
|
|
|
|
<!-- Attention -->
|
|
<Trigger Property="Appearance" Value="Attention">
|
|
<Setter Property="Background" Value="{DynamicResource SystemFillColorAttentionBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextOnAccentFillColorPrimaryBrush}" />
|
|
<!--<Setter Property="BorderBrush" Value="{DynamicResource AttentionElevationBorderBrush}" />-->
|
|
<Setter Property="MouseOverBackground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="{DynamicResource SystemFillColorAttention}" Opacity="0.9" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="PressedBackground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="{DynamicResource SystemFillColorAttention}" Opacity="0.8" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="PressedForeground" Value="{DynamicResource TextOnAccentFillColorSecondaryBrush}" />
|
|
</Trigger>
|
|
|
|
<!-- Critical -->
|
|
<Trigger Property="Appearance" Value="Critical">
|
|
<Setter Property="Background" Value="{DynamicResource SystemFillColorCriticalBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextOnAccentFillColorPrimaryBrush}" />
|
|
<!--<Setter Property="BorderBrush" Value="{DynamicResource CriticalElevationBorderBrush}" />-->
|
|
<Setter Property="MouseOverBackground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="{DynamicResource SystemFillColorCritical}" Opacity="0.9" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="PressedBackground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="{DynamicResource SystemFillColorCritical}" Opacity="0.8" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="PressedForeground" Value="{DynamicResource TextOnAccentFillColorSecondaryBrush}" />
|
|
</Trigger>
|
|
|
|
<!-- Success -->
|
|
<Trigger Property="Appearance" Value="Success">
|
|
<Setter Property="Background" Value="{DynamicResource SystemFillColorSuccessBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextOnAccentFillColorPrimaryBrush}" />
|
|
<!--<Setter Property="BorderBrush" Value="{DynamicResource SuccessElevationBorderBrush}" />-->
|
|
<Setter Property="MouseOverBackground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="{DynamicResource SystemFillColorSuccess}" Opacity="0.9" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="PressedBackground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="{DynamicResource SystemFillColorSuccess}" Opacity="0.8" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="PressedForeground" Value="{DynamicResource TextOnAccentFillColorSecondaryBrush}" />
|
|
</Trigger>
|
|
|
|
<!-- Caution -->
|
|
<Trigger Property="Appearance" Value="Caution">
|
|
<Setter Property="Background" Value="{DynamicResource SystemFillColorCautionBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextOnAccentFillColorPrimaryBrush}" />
|
|
<!--<Setter Property="BorderBrush" Value="{DynamicResource CautionElevationBorderBrush}" />-->
|
|
<Setter Property="MouseOverBackground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="{DynamicResource SystemFillColorCaution}" Opacity="0.9" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="PressedBackground">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="{DynamicResource SystemFillColorCaution}" Opacity="0.8" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="PressedForeground" Value="{DynamicResource TextOnAccentFillColorSecondaryBrush}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultRepeatButtonStyle}" TargetType="{x:Type RepeatButton}" />
|
|
<Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="{x:Type Button}" />
|
|
<Style BasedOn="{StaticResource DefaultUiButtonStyle}" TargetType="{x:Type controls:Button}" />
|
|
<Style
|
|
BasedOn="{StaticResource DefaultButtonStyle}"
|
|
TargetType="{x:Type Button}"
|
|
x:Key="SimpleButtonStyle">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<!-- <Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" /> -->
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<!-- <Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" /> -->
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{DynamicResource ControlCornerRadius}"
|
|
Padding="{TemplateBinding Padding}"
|
|
SnapsToDevicePixels="True"
|
|
x:Name="ContentPresenter">
|
|
<ContentPresenter
|
|
Focusable="False"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource ControlFillColorSecondaryBrush}" />
|
|
<Setter Property="BorderBrush" TargetName="ContentPresenter" Value="{DynamicResource ControlElevationBorderBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource ControlFillColorSecondaryBrush}" />
|
|
<Setter Property="BorderBrush" TargetName="ContentPresenter" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextFillColorSecondaryBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="BorderBrush" TargetName="ContentPresenter" Value="{DynamicResource ControlStrokeColorDefaultBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextFillColorDisabledBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ResourceDictionary> |