This commit is contained in:
ShrlAlgo
2025-07-11 09:20:23 +08:00
parent c7b104f44f
commit 4d35cadb56
840 changed files with 102347 additions and 11595 deletions

View File

@@ -0,0 +1,55 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:AntdWpf.Controls"
xmlns:helpers="clr-namespace:AntdWpf.Helpers">
<!-- WindowButtons/WindowCommands -->
<Style x:Key="Ant.WindowButton" TargetType="{x:Type ButtonBase}">
<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:Control.PressedBackground" Value="{DynamicResource WindowButtonPressedBrush}" />
<Setter Property="helpers:Control.MouseOverBackground" Value="{DynamicResource WindowButtonFocusedBrush}" />
<Setter Property="Foreground"
Value="{Binding TitleBarForeground, Mode=OneWay,
RelativeSource={RelativeSource AncestorType={x:Type controls:Window}}}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ButtonBase}">
<Grid x:Name="Root" Background="{TemplateBinding Background}">
<ContentPresenter RecognizesAccessKey="True"
Margin="{TemplateBinding Padding}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Root"
Property="Background"
Value="{Binding Path=(helpers:Control.MouseOverBackground),Mode=OneWay,
RelativeSource={RelativeSource TemplatedParent}}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Root"
Property="Background"
Value="{Binding Path=(helpers:Control.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>