| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <Style x:Key="CheckRadioFocusVisual">
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle Margin="-2"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- SnapsToDevicePixels="true"
- Stroke="{DynamicResource FocusVisualBrush}"
- StrokeDashArray="1,2"
- StrokeThickness="1" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="RadioButtonStyle" TargetType="{x:Type RadioButton}">
- <Setter Property="BorderBrush" Value="{DynamicResource CommonBorderBrush}" />
- <Setter Property="Foreground" Value="{DynamicResource MainForegroundBrush}" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
- <Setter Property="Padding" Value="2,0,0,0" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RadioButton}">
- <Grid>
- <Rectangle Name="OutSideBorder"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch"
- SnapsToDevicePixels="true"
- Stroke="{DynamicResource FocusVisualBrush}"
- StrokeDashArray="1,2"
- StrokeThickness="1"
- Visibility="Collapsed" />
- <Grid Margin="1" SnapsToDevicePixels="False">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Ellipse x:Name="Border"
- Width="17"
- Height="17"
- Fill="{DynamicResource ContentBackground}"
- Stroke="{TemplateBinding BorderBrush}"
- StrokeThickness="1" />
- <Ellipse x:Name="Dot"
- Grid.Column="0"
- Width="10"
- Height="10"
- Fill="{DynamicResource CheckedBrush}"
- Visibility="Collapsed" />
- <ContentPresenter Grid.Column="1"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- RecognizesAccessKey="True" />
- </Grid>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="Dot" Property="Visibility" Value="Visible" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
- <Setter TargetName="Dot" Property="Fill" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- <Trigger Property="IsFocused" Value="true">
- <Setter TargetName="OutSideBorder" Property="Visibility" Value="Visible" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|