A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

38 lines
1.7 KiB

<Styles xmlns="https://github.com/perspex">
<Style Selector="ToggleButton">
<Setter Property="Background" Value="#ffaaaaaa"/>
<Setter Property="BorderBrush" Value="#ffaaaaaa"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<ControlTemplate>
<Border Name="border"
Padding="3"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter Content="{TemplateBinding Content}"
Margin="{TemplateBinding Padding}"
TextBlock.Foreground="{TemplateBinding Foreground}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter>
</Style>
<Style Selector="ToggleButton:checked /template/ Border#border">
<Setter Property="Background" Value="#ff777777"/>
<Setter Property="BorderBrush" Value="#ff777777"/>
</Style>
<Style Selector="ToggleButton:pointerover /template/ Border#border">
<Setter Property="BorderBrush" Value="#ff888888"/>
</Style>
<Style Selector="ToggleButton:pressed /template/ Border#border">
<Setter Property="Background" Value="#ff888888"/>
</Style>
<Style Selector="ToggleButton:disabled">
<Setter Property="Opacity" Value="0.5"/>
</Style>
</Styles>