VRCMelonAssistant/ModAssistant/Styles/Button.xaml

44 lines
2.7 KiB
Plaintext
Raw Normal View History

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="Button">
<Setter Property="Background" Value="{DynamicResource ButtonBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBackground}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Foreground" Value="{DynamicResource TextColor}" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="MinHeight" Value="25" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Name="Chrome"
Background="{TemplateBinding Background}"
BorderBrush="{DynamicResource ButtonOutline}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="true"
TextBlock.Foreground="{DynamicResource TextColor}">
<ContentPresenter Name="Presenter"
Margin="{TemplateBinding Padding}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
TextBlock.Foreground="{DynamicResource TextColor}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="UIElement.IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonHighlightedBackground}"/>
<Setter Property="Foreground" Value="{DynamicResource TextHighlighted}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ButtonClickedBackground}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource ButtonDisabledBackground}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>