Files
bluflame/intromat/Intromat/Themes/Resources.xaml
2026-04-18 22:31:51 +02:00

61 lines
4.0 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="IconToolButton" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Padding" Value="3" />
<Setter Property="BorderBrush" Value="{DynamicResource ControlDefaultBackground}" />
<Setter Property="Background" Value="{DynamicResource ControlDefaultBackground}" />
<Setter Property="Foreground" Value="{DynamicResource ControlGlyphColor}" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="UseLayoutRounding" Value="true" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="true"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<TextBlock x:Name="contentPresenter" Text="{TemplateBinding Content}"
Focusable="False"
Margin="{TemplateBinding Padding}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
UseLayoutRounding="{TemplateBinding UseLayoutRounding}"
FontSize="12"
FontFamily="Segoe MDL2 Assets"
Foreground="{TemplateBinding TextElement.Foreground}"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsDefaulted" Value="true">
<Setter Property="BorderBrush" TargetName="border"
Value="{StaticResource ControlMouseOverBorderBrush}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border"
Value="{StaticResource ControlPrimaryMouseOverBackground}" />
<Setter Property="BorderBrush" TargetName="border"
Value="{StaticResource ControlPrimaryMouseOverBorderBrush}" />
<Setter Property="Foreground" TargetName="contentPresenter"
Value="{StaticResource ControlMouseOverGlyphColor}" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border"
Value="{StaticResource ControlPrimarySelectedBackground}" />
<Setter Property="BorderBrush" TargetName="border"
Value="{StaticResource ControlPrimarySelectedBorderBrush}" />
<Setter Property="Foreground" TargetName="contentPresenter"
Value="{StaticResource ControlSelectedGlyphColor}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" TargetName="contentPresenter"
Value="{StaticResource ControlDisabledGlyphColor}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>