49 lines
2.9 KiB
XML
49 lines
2.9 KiB
XML
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:controls="clr-namespace:AntDesign.WPF.Controls"
|
|
xmlns:helpers="clr-namespace:AntDesign.WPF.Helpers"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
|
<!-- WindowButtons/WindowCommands -->
|
|
<Style TargetType="{x:Type ButtonBase}" x:Key="Ant.WindowButton">
|
|
<Setter Property="Padding" Value="12,0" />
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="helpers:AntdControl.PressedBackground" Value="{DynamicResource WindowButtonPressedBrush}" />
|
|
<Setter Property="helpers:AntdControl.MouseOverBackground" Value="{DynamicResource WindowButtonFocusedBrush}" />
|
|
<Setter Property="Foreground" Value="{Binding TitleBarForeground, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type controls:AntdWindow}}}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
|
<Grid Background="{TemplateBinding Background}" x:Name="Root">
|
|
<ContentPresenter
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
Margin="{TemplateBinding Padding}"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" TargetName="Root" Value="{Binding Path=(helpers:AntdControl.MouseOverBackground), Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="Background" TargetName="Root" Value="{Binding Path=(helpers:AntdControl.PressedBackground), Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Foreground" Value="{DynamicResource ButtonDisableForeground}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
</ResourceDictionary> |