4 changed files with 81 additions and 0 deletions
@ -0,0 +1,35 @@ |
|||
<Styles xmlns="https://github.com/perspex"> |
|||
<Style Selector="RadioButton"> |
|||
<Setter Property="BorderBrush" Value="#ff333333"/> |
|||
<Setter Property="BorderThickness" Value="2"/> |
|||
<Setter Property="Template"> |
|||
<ControlTemplate> |
|||
<Grid ColumnDefinitions="Auto,*"> |
|||
<Ellipse Stroke="{TemplateBinding BorderBrush}" |
|||
StrokeThickness="{TemplateBinding BorderThickness}" |
|||
Width="18" |
|||
Height="18" |
|||
VerticalAlignment="Center"/> |
|||
<Ellipse Name="checkMark" |
|||
Fill="{TemplateBinding BorderBrush}" |
|||
Width="10" |
|||
Height="10" |
|||
Stretch="Uniform" |
|||
HorizontalAlignment="Center" |
|||
VerticalAlignment="Center"/> |
|||
<ContentPresenter Name="PART_ContentPresenter" |
|||
Content="{TemplateBinding Content}" |
|||
Margin="4,0,0,0" |
|||
VerticalAlignment="Center" |
|||
Grid.Column="1"/> |
|||
</Grid> |
|||
</ControlTemplate> |
|||
</Setter> |
|||
</Style> |
|||
<Style Selector="RadioButton /template/ Ellipse#checkMark"> |
|||
<Setter Property="IsVisible" Value="False"/> |
|||
</Style> |
|||
<Style Selector="RadioButton:checked /template/ Ellipse#checkMark"> |
|||
<Setter Property="IsVisible" Value="True"/> |
|||
</Style> |
|||
</Styles> |
|||
@ -0,0 +1,38 @@ |
|||
<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> |
|||
Loading…
Reference in new issue