95 lines
5.8 KiB
Plaintext
95 lines
5.8 KiB
Plaintext
|
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:wpf="clr-namespace:WPFDark">
|
||
|
|
<Style TargetType="{x:Type RadioButton}">
|
||
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||
|
|
<Setter Property="Background" Value="{DynamicResource ActiveBackgroundBrushKey}" />
|
||
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ActiveBorderBrushKey}" />
|
||
|
|
<Setter Property="Foreground" Value="{DynamicResource ForegroundBrushKey}" />
|
||
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||
|
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||
|
|
<Setter Property="Padding" Value="4,1,0,0" />
|
||
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
|
||
|
|
|
||
|
|
<Setter Property="Template">
|
||
|
|
<Setter.Value>
|
||
|
|
<ControlTemplate TargetType="{x:Type RadioButton}">
|
||
|
|
<Grid Background="Transparent" SnapsToDevicePixels="True">
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
|
||
|
|
<Ellipse x:Name="radioButtonBorder"
|
||
|
|
Grid.Column="0"
|
||
|
|
Width="16"
|
||
|
|
Height="16"
|
||
|
|
Margin="0,2"
|
||
|
|
HorizontalAlignment="Center"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
Fill="{TemplateBinding Background}"
|
||
|
|
SnapsToDevicePixels="False"
|
||
|
|
Stroke="{TemplateBinding BorderBrush}"
|
||
|
|
StrokeThickness="1.0"
|
||
|
|
UseLayoutRounding="False" />
|
||
|
|
|
||
|
|
<Ellipse x:Name="optionMark"
|
||
|
|
Grid.Column="0"
|
||
|
|
Width="10"
|
||
|
|
Height="10"
|
||
|
|
HorizontalAlignment="Center"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
Fill="{DynamicResource AccentBrushKey}"
|
||
|
|
SnapsToDevicePixels="False"
|
||
|
|
UseLayoutRounding="False"
|
||
|
|
Visibility="Collapsed" />
|
||
|
|
|
||
|
|
<ContentPresenter Grid.Column="1"
|
||
|
|
Margin="{TemplateBinding Padding}"
|
||
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
Content="{TemplateBinding Content}"
|
||
|
|
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||
|
|
Focusable="False"
|
||
|
|
RecognizesAccessKey="True"
|
||
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
<ControlTemplate.Triggers>
|
||
|
|
<Trigger Property="IsMouseOver" Value="True">
|
||
|
|
<Setter TargetName="radioButtonBorder" Property="Stroke" Value="{DynamicResource AccentBrushKey}" />
|
||
|
|
<Setter TargetName="optionMark" Property="Fill" Value="{DynamicResource AccentBrushKey}" />
|
||
|
|
<Setter Property="Foreground" Value="{DynamicResource ActiveForegroundBrushKey}" />
|
||
|
|
<Setter TargetName="radioButtonBorder" Property="StrokeThickness" Value="1.0" />
|
||
|
|
</Trigger>
|
||
|
|
|
||
|
|
<Trigger Property="IsMouseOver" Value="False">
|
||
|
|
<Setter TargetName="radioButtonBorder" Property="StrokeThickness" Value="0.0" />
|
||
|
|
</Trigger>
|
||
|
|
|
||
|
|
<Trigger Property="IsEnabled" Value="False">
|
||
|
|
<Setter TargetName="radioButtonBorder" Property="Stroke" Value="{DynamicResource InactiveBorderBrushKey}" />
|
||
|
|
<Setter TargetName="radioButtonBorder" Property="Fill" Value="Transparent" />
|
||
|
|
<Setter TargetName="optionMark" Property="Fill" Value="{DynamicResource InactiveForegroundBrushKey}" />
|
||
|
|
<Setter Property="Foreground" Value="{DynamicResource InactiveForegroundBrushKey}" />
|
||
|
|
<Setter TargetName="radioButtonBorder" Property="StrokeThickness" Value="1.0" />
|
||
|
|
</Trigger>
|
||
|
|
|
||
|
|
<Trigger Property="IsPressed" Value="True">
|
||
|
|
<Setter TargetName="radioButtonBorder" Property="Fill" Value="{DynamicResource AccentBrushKey}" />
|
||
|
|
<Setter TargetName="radioButtonBorder" Property="StrokeThickness" Value="0.0" />
|
||
|
|
<Setter TargetName="optionMark" Property="Fill" Value="{DynamicResource AccentBrushKey}" />
|
||
|
|
<Setter Property="Foreground" Value="{DynamicResource AccentBrushKey}" />
|
||
|
|
</Trigger>
|
||
|
|
|
||
|
|
<Trigger Property="IsChecked" Value="True">
|
||
|
|
<Setter TargetName="optionMark" Property="Visibility" Value="Visible" />
|
||
|
|
</Trigger>
|
||
|
|
</ControlTemplate.Triggers>
|
||
|
|
</ControlTemplate>
|
||
|
|
</Setter.Value>
|
||
|
|
</Setter>
|
||
|
|
</Style>
|
||
|
|
</ResourceDictionary>
|