Files
ShrlAlgoToolkit/WPFDark/Controls/BiaIconToggleButton.xaml
ShrlAlgo 4d35cadb56 更新
2025-07-11 09:20:23 +08:00

67 lines
3.6 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wpf="clr-namespace:WPFDark"
xmlns:controls="clr-namespace:WPFDark.Controls">
<Style TargetType="{x:Type controls:BiaIconToggleButton}">
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundBrushKey}" />
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrushKey}" />
<Setter Property="Width" Value="{x:Static wpf:Boxes.BasicOneLineHeight}" />
<Setter Property="Height" Value="{x:Static wpf:Boxes.BasicOneLineHeight}" />
<Setter Property="CornerRadius" Value="{x:Static wpf:Boxes.BasicCornerRadiusPrim}" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonActiveBackgroundBrushKey}" />
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrushKey}" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsPressed" Value="True" />
<Condition Property="IsPressedMouseOver" Value="True" />
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{DynamicResource ButtonPressedBackgroundBrushKey}" />
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrushKey}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsPressed" Value="True" />
<Condition Property="IsPressedMouseOver" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundBrushKey}" />
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrushKey}" />
</MultiTrigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource ButtonInactiveBackgroundBrushKey}" />
<Setter Property="Foreground" Value="{DynamicResource InactiveForegroundBrushKey}" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="{DynamicResource ToggleButtonBackgroundBrushKey.IsChecked}" />
<Setter Property="Foreground" Value="{DynamicResource AccentForegroundBrushKey}" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsChecked" Value="True" />
<Condition Property="IsMouseOver" Value="True" />
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{DynamicResource ToggleButtonBackgroundBrushKey.IsChecked.IsMouseOver}" />
<Setter Property="Foreground" Value="{DynamicResource AccentForegroundBrushKey}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsChecked" Value="True" />
<Condition Property="IsEnabled" Value="False" />
</MultiTrigger.Conditions>
<Setter Property="Background" Value="{DynamicResource ToggleButtonBackgroundBrushKey.IsChecked.IsDisabled}" />
<Setter Property="Foreground" Value="{DynamicResource ButtonInactiveForegroundBrushKey}" />
</MultiTrigger>
</Style.Triggers>
</Style>
</ResourceDictionary>