Merge pull request #437 from irihitech/radio

unity CheckBox & RadioButton
This commit is contained in:
Dong Bin 2024-09-23 13:03:38 +08:00 committed by GitHub
commit 32ff9735ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 149 additions and 166 deletions

View File

@ -16,11 +16,6 @@
</StackPanel> </StackPanel>
</Design.PreviewWith> </Design.PreviewWith>
<ControlTheme x:Key="RadioButtonGroupBorder" TargetType="Border">
<Setter Property="Border.CornerRadius" Value="{DynamicResource RadioButtonGroupCornerRadius}" />
<Setter Property="Border.Background" Value="{DynamicResource RadioButtonGroupBackground}" />
</ControlTheme>
<ControlTheme x:Key="CardBorder" TargetType="Border"> <ControlTheme x:Key="CardBorder" TargetType="Border">
<Setter Property="Border.Padding" Value="{DynamicResource ThicknessCardPadding}" /> <Setter Property="Border.Padding" Value="{DynamicResource ThicknessCardPadding}" />
<Setter Property="Border.BorderBrush" Value="{DynamicResource BorderCardBorderBrush}" /> <Setter Property="Border.BorderBrush" Value="{DynamicResource BorderCardBorderBrush}" />

View File

@ -2,19 +2,27 @@
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True"> x:CompileBindings="True">
<Design.PreviewWith>
<ThemeVariantScope RequestedThemeVariant="Dark">
<StackPanel Background="{DynamicResource SemiBackground0Color}">
<CheckBox>Hello</CheckBox>
<CheckBox>Hello</CheckBox>
<CheckBox Theme="{DynamicResource CardCheckBox}">Hello</CheckBox>
<CheckBox Theme="{DynamicResource PureCardCheckBox}">Hello</CheckBox>
</StackPanel>
</ThemeVariantScope>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type CheckBox}" TargetType="CheckBox"> <ControlTheme x:Key="{x:Type CheckBox}" TargetType="CheckBox">
<Setter Property="Padding" Value="8,0,0,0" />
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
<Setter Property="MinHeight" Value="32" />
<Setter Property="Foreground" Value="{DynamicResource CheckBoxForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxForeground}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource CheckBoxDefaultBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<Border <Border
@ -23,12 +31,11 @@
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid x:Name="RootGrid" ColumnDefinitions="Auto,*"> <Grid ColumnDefinitions="Auto,*">
<Grid <Panel
Grid.Column="0" Grid.Column="0"
TemplatedControl.IsTemplateFocusTarget="True" TemplatedControl.IsTemplateFocusTarget="True"
Margin="0,0,0,0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
VerticalAlignment="Center">
<Border <Border
x:Name="NormalRectangle" x:Name="NormalRectangle"
Width="{DynamicResource CheckBoxBoxWidth}" Width="{DynamicResource CheckBoxBoxWidth}"
@ -39,20 +46,21 @@
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<PathIcon <PathIcon
Name="CheckGlyph" x:Name="CheckGlyph"
Width="{DynamicResource CheckBoxBoxGlyphWidth}" Width="{DynamicResource CheckBoxBoxGlyphWidth}"
Height="{DynamicResource CheckBoxBoxGlyphHeight}" Height="{DynamicResource CheckBoxBoxGlyphHeight}"
Foreground="{DynamicResource CheckBoxGlyphFill}" /> Foreground="{DynamicResource CheckBoxGlyphFill}" />
</Grid> </Panel>
<ContentPresenter <ContentPresenter
x:Name="ContentPresenter" x:Name="PART_ContentPresenter"
Grid.Column="1" Grid.Column="1"
Margin="{TemplateBinding Padding}" Margin="{DynamicResource CheckBoxContentMargin}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="Center" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}" IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
FontSize="{TemplateBinding FontSize}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</Grid> </Grid>
@ -78,7 +86,7 @@
<!-- Unchecked Disabled state --> <!-- Unchecked Disabled state -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Style Selector="^ /template/ ContentPresenter#ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
@ -116,7 +124,7 @@
<!-- Checked Disabled State --> <!-- Checked Disabled State -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Style Selector="^ /template/ ContentPresenter#ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
@ -159,7 +167,7 @@
<!-- Checked Disabled State --> <!-- Checked Disabled State -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Style Selector="^ /template/ ContentPresenter#ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
@ -177,14 +185,14 @@
<ControlTheme x:Key="SimpleCheckBox" TargetType="CheckBox"> <ControlTheme x:Key="SimpleCheckBox" TargetType="CheckBox">
<Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" /> <Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
<Setter Property="Foreground" Value="{DynamicResource CheckBoxForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxForeground}" />
<Setter Property="Background" Value="{DynamicResource CheckBoxDefaultBackground}" /> <Setter Property="Background" Value="{DynamicResource CheckBoxDefaultBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<Border <Border
@ -193,11 +201,11 @@
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid x:Name="RootGrid" ColumnDefinitions="Auto,*"> <Grid ColumnDefinitions="Auto,*">
<Grid <Panel
Grid.Column="0" Grid.Column="0"
Margin="0,0,0,0" TemplatedControl.IsTemplateFocusTarget="True"
VerticalAlignment="Center"> VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Border <Border
x:Name="NormalRectangle" x:Name="NormalRectangle"
Width="{DynamicResource CheckBoxBoxWidth}" Width="{DynamicResource CheckBoxBoxWidth}"
@ -208,11 +216,11 @@
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<PathIcon <PathIcon
Name="CheckGlyph" x:Name="CheckGlyph"
Width="{DynamicResource CheckBoxBoxGlyphWidth}" Width="{DynamicResource CheckBoxBoxGlyphWidth}"
Height="{DynamicResource CheckBoxBoxGlyphHeight}" Height="{DynamicResource CheckBoxBoxGlyphHeight}"
Foreground="{DynamicResource CheckBoxGlyphFill}" /> Foreground="{DynamicResource CheckBoxGlyphFill}" />
</Grid> </Panel>
</Grid> </Grid>
</Border> </Border>
</ControlTemplate> </ControlTemplate>
@ -324,27 +332,31 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="CardCheckBox" TargetType="CheckBox"> <ControlTheme x:Key="CardCheckBox" TargetType="CheckBox">
<Setter Property="Cursor" Value="Hand" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" /> <Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" />
<Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" /> <Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="CheckBox.Template"> <Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<Border <Border
Name="RootBorder" x:Name="RootBorder"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid <Grid
x:Name="RootGrid"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
ColumnDefinitions="Auto,*"> ColumnDefinitions="Auto,*">
<Grid Grid.Column="0" VerticalAlignment="Top"> <Panel
Grid.Column="0"
VerticalAlignment="Top"
Margin="{DynamicResource CheckBoxBoxMargin}">
<Border <Border
x:Name="NormalRectangle" x:Name="NormalRectangle"
Width="{DynamicResource CheckBoxBoxWidth}" Width="{DynamicResource CheckBoxBoxWidth}"
@ -355,21 +367,23 @@
CornerRadius="{DynamicResource CheckBoxBoxCornerRadius}" CornerRadius="{DynamicResource CheckBoxBoxCornerRadius}"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<PathIcon <PathIcon
Name="CheckGlyph" x:Name="CheckGlyph"
Width="{DynamicResource CheckBoxBoxGlyphWidth}" Width="{DynamicResource CheckBoxBoxGlyphWidth}"
Height="{DynamicResource CheckBoxBoxGlyphHeight}" Height="{DynamicResource CheckBoxBoxGlyphHeight}"
Foreground="{DynamicResource CheckBoxGlyphFill}" /> Foreground="{DynamicResource CheckBoxGlyphFill}" />
</Panel>
</Grid>
<ContentPresenter <ContentPresenter
x:Name="ContentPresenter" x:Name="PART_ContentPresenter"
Grid.Column="1" Grid.Column="1"
Margin="8,0,0,0" Margin="{DynamicResource CheckBoxContentMargin}"
VerticalAlignment="Center" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
IsVisible="{TemplateBinding Content, Foreground="{TemplateBinding Foreground}"
Converter={x:Static ObjectConverters.IsNotNull}}" IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
FontSize="{TemplateBinding FontSize}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</Grid> </Grid>
@ -399,7 +413,7 @@
<!-- Unchecked Disabled state --> <!-- Unchecked Disabled state -->
<Style Selector="^:disabled"> <Style Selector="^:disabled">
<Style Selector="^ /template/ ContentPresenter#ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
@ -450,7 +464,7 @@
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ Border#RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" />
</Style> </Style>
<Style Selector="^ /template/ ContentPresenter#ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
@ -505,7 +519,7 @@
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ Border#RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" /> <Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" />
</Style> </Style>
<Style Selector="^ /template/ ContentPresenter#ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
</Style> </Style>
<Style Selector="^ /template/ Border#NormalRectangle"> <Style Selector="^ /template/ Border#NormalRectangle">
@ -521,20 +535,22 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="PureCardCheckBox" TargetType="CheckBox"> <ControlTheme x:Key="PureCardCheckBox" TargetType="CheckBox">
<Setter Property="Cursor" Value="Hand" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" /> <Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" />
<Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" /> <Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" /> <Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" />
<Setter Property="CheckBox.VerticalContentAlignment" Value="Center" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
<Setter Property="CheckBox.Template"> <Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<ControlTemplate TargetType="CheckBox"> <ControlTemplate TargetType="CheckBox">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" x:Name="PART_ContentPresenter"
Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Foreground="{TemplateBinding Foreground}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@ -542,7 +558,8 @@
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
UseLayoutRounding="False" /> UseLayoutRounding="False"
TextWrapping="Wrap" />
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>

View File

@ -3,78 +3,70 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True"> x:CompileBindings="True">
<Design.PreviewWith> <Design.PreviewWith>
<StackPanel Margin="20"> <ThemeVariantScope RequestedThemeVariant="Dark">
<RadioButton>Hello Button2</RadioButton> <StackPanel Background="{DynamicResource SemiBackground0Color}">
<RadioButton>Hello Button3</RadioButton> <RadioButton>Hello</RadioButton>
<Border Theme="{StaticResource RadioButtonGroupBorder}"> <RadioButton>Hello</RadioButton>
<StackPanel Orientation="Horizontal"> <RadioButton Theme="{DynamicResource CardRadioButton}">Hello</RadioButton>
<RadioButton Theme="{StaticResource ButtonRadioButton}">Hello Button2</RadioButton> <RadioButton Theme="{DynamicResource PureCardRadioButton}">Hello</RadioButton>
<RadioButton Theme="{StaticResource ButtonRadioButton}">Hello Button3</RadioButton> </StackPanel>
</StackPanel> </ThemeVariantScope>
</Border>
<RadioButton Theme="{StaticResource PureCardRadioButton}">Hello Button3</RadioButton>
<RadioButton Theme="{StaticResource PureCardRadioButton}">Hello Button3</RadioButton>
</StackPanel>
</Design.PreviewWith> </Design.PreviewWith>
<!-- Theme: Default, Button, Card, PureCard --> <!-- Theme: Default, Button, Card, PureCard -->
<ControlTheme x:Key="{x:Type RadioButton}" TargetType="RadioButton"> <ControlTheme x:Key="{x:Type RadioButton}" TargetType="RadioButton">
<Setter Property="RadioButton.HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="RadioButton.VerticalAlignment" Value="Top" /> <Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="RadioButton.Cursor" Value="Hand" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="RadioButton.HorizontalContentAlignment" Value="Left" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="RadioButton.VerticalContentAlignment" Value="Center" /> <Setter Property="FontSize" Value="{DynamicResource RadioButtonFontSize}" />
<Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonFontSize}" /> <Setter Property="Foreground" Value="{DynamicResource RadioButtonForeground}" />
<Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonBoxCornerRadius}" /> <Setter Property="Background" Value="{DynamicResource RadioButtonDefaultBackground}" />
<Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonForeground}" /> <Setter Property="BorderBrush" Value="{DynamicResource RadioButtonDefaultBorderBrush}" />
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonDefaultBackground}" /> <Setter Property="CornerRadius" Value="{DynamicResource RadioButtonBoxCornerRadius}" />
<Setter Property="RadioButton.BorderBrush" Value="{DynamicResource RadioButtonDefaultBorderBrush}" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<Border <Border
Name="RootBorder" x:Name="RootBorder"
Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"> CornerRadius="{TemplateBinding CornerRadius}">
<Grid ColumnDefinitions="Auto,*"> <Grid ColumnDefinitions="Auto,*">
<Grid <Panel
Grid.Column="0" Grid.Column="0"
TemplatedControl.IsTemplateFocusTarget="True" TemplatedControl.IsTemplateFocusTarget="True"
Margin="{DynamicResource RadioButtonIconMargin}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
<Ellipse <Ellipse
Name="OuterEllipse" x:Name="OuterEllipse"
Width="{DynamicResource RadioButtonIconRadius}" Width="{DynamicResource RadioButtonIconRadius}"
Height="{DynamicResource RadioButtonIconRadius}" Height="{DynamicResource RadioButtonIconRadius}"
Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}" Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}"
Stroke="{DynamicResource RadioButtonUncheckIconDefaultBorderBrush}" Stroke="{DynamicResource RadioButtonUncheckIconDefaultBorderBrush}"
StrokeThickness="1" StrokeThickness="{DynamicResource RadioButtonUncheckIconDefaultThickness}"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<Ellipse <Ellipse
Name="CheckGlyph" x:Name="CheckGlyph"
Width="{DynamicResource RadioButtonGlyphRadius}" Width="{DynamicResource RadioButtonGlyphRadius}"
Height="{DynamicResource RadioButtonGlyphRadius}" Height="{DynamicResource RadioButtonGlyphRadius}"
Fill="{DynamicResource RadioButtonCheckGlyphFill}" Fill="{DynamicResource RadioButtonCheckGlyphFill}"
Opacity="0"
Stroke="{DynamicResource RadioButtonCheckGlyphFill}" Stroke="{DynamicResource RadioButtonCheckGlyphFill}"
StrokeThickness="0"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
</Grid> </Panel>
<ContentPresenter <ContentPresenter
Name="PART_ContentPresenter" x:Name="PART_ContentPresenter"
Grid.Column="1" Grid.Column="1"
Margin="{DynamicResource RadioButtonContentMargin}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
FontSize="{TemplateBinding FontSize}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
TextElement.FontSize="{DynamicResource RadioButtonFontSize}" TextWrapping="Wrap" />
TextElement.Foreground="{DynamicResource RadioButtonForeground}" />
</Grid> </Grid>
</Border> </Border>
</ControlTemplate> </ControlTemplate>
@ -96,9 +88,6 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPointeroverBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPointeroverBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconPointeroverBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconPointeroverBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="0" />
</Style>
</Style> </Style>
<!-- Unchecked Pressed State --> <!-- Unchecked Pressed State -->
@ -107,9 +96,6 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPressedBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPressedBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconPressedBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconPressedBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="0" />
</Style>
</Style> </Style>
<!-- Unchecked Disabled state --> <!-- Unchecked Disabled state -->
@ -118,9 +104,6 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDisabledBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDisabledBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDisabledBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="0" />
</Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" />
</Style> </Style>
@ -143,9 +126,6 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointeroverBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointeroverBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointeroverBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointeroverBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="1" />
</Style>
</Style> </Style>
<!-- Checked Pressed State --> <!-- Checked Pressed State -->
@ -154,9 +134,6 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPressedBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPressedBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPressedBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPressedBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="1" />
</Style>
</Style> </Style>
<!-- Checked Disabled State --> <!-- Checked Disabled State -->
@ -165,9 +142,6 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDisabledBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="1" />
</Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" />
</Style> </Style>
@ -175,16 +149,21 @@
</Style> </Style>
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="RadioButtonGroupBorder" TargetType="Border">
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonGroupCornerRadius}" />
<Setter Property="Background" Value="{DynamicResource RadioButtonGroupBackground}" />
</ControlTheme>
<ControlTheme x:Key="ButtonRadioButton" TargetType="RadioButton"> <ControlTheme x:Key="ButtonRadioButton" TargetType="RadioButton">
<Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonButtonCornerRadius}" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="RadioButton.VerticalContentAlignment" Value="Center" /> <Setter Property="Padding" Value="{DynamicResource RadioButtonButtonDefaultPadding}" />
<Setter Property="RadioButton.Margin" Value="2" /> <Setter Property="Margin" Value="2" />
<Setter Property="RadioButton.Cursor" Value="Hand" /> <Setter Property="FontWeight" Value="{DynamicResource RadioButtonButtonFontWeight}" />
<Setter Property="RadioButton.FontWeight" Value="{DynamicResource RadioButtonButtonFontWeight}" /> <Setter Property="FontSize" Value="{DynamicResource RadioButtonButtonDefaultFontSize}" />
<Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonButtonDefaultFontSize}" /> <Setter Property="Foreground" Value="{DynamicResource RadioButtonButtonUncheckedForeground}" />
<Setter Property="RadioButton.Padding" Value="{DynamicResource RadioButtonButtonDefaultPadding}" /> <Setter Property="CornerRadius" Value="{DynamicResource RadioButtonButtonCornerRadius}" />
<Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonButtonUncheckedForeground}" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="RadioButton.Template"> <Setter Property="Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" x:Name="PART_ContentPresenter"
@ -231,21 +210,18 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="CardRadioButton" TargetType="RadioButton"> <ControlTheme x:Key="CardRadioButton" TargetType="RadioButton">
<Setter Property="RadioButton.Padding" Value="{DynamicResource RadioButtonCardPadding}" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="RadioButton.BorderThickness" Value="1" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" /> <Setter Property="Padding" Value="{DynamicResource RadioButtonCardPadding}" />
<Setter Property="RadioButton.Cursor" Value="Hand" /> <Setter Property="FontSize" Value="{DynamicResource RadioButtonFontSize}" />
<Setter Property="RadioButton.HorizontalAlignment" Value="Left" /> <Setter Property="CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" />
<Setter Property="RadioButton.VerticalAlignment" Value="Center" /> <Setter Property="Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" />
<Setter Property="RadioButton.HorizontalContentAlignment" Value="Left" /> <Setter Property="BorderThickness" Value="{DynamicResource RadioButtonBorderThickness}" />
<Setter Property="RadioButton.VerticalContentAlignment" Value="Center" /> <Setter Property="Cursor" Value="Hand" />
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" />
<Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonFontSize}" />
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<Border <Border
Name="RootBorder" x:Name="RootBorder"
Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
@ -255,9 +231,12 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
ColumnDefinitions="Auto,*"> ColumnDefinitions="Auto,*">
<Grid Margin="{DynamicResource RadioButtonIconMargin}" VerticalAlignment="Top"> <Panel
Grid.Column="0"
VerticalAlignment="Top"
Margin="{DynamicResource RadioButtonIconMargin}">
<Ellipse <Ellipse
Name="OuterEllipse" x:Name="OuterEllipse"
Width="{DynamicResource RadioButtonIconRadius}" Width="{DynamicResource RadioButtonIconRadius}"
Height="{DynamicResource RadioButtonIconRadius}" Height="{DynamicResource RadioButtonIconRadius}"
Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}" Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}"
@ -266,26 +245,27 @@
UseLayoutRounding="False" /> UseLayoutRounding="False" />
<Ellipse <Ellipse
Name="CheckGlyph" x:Name="CheckGlyph"
Width="{DynamicResource RadioButtonGlyphRadius}" Width="{DynamicResource RadioButtonGlyphRadius}"
Height="{DynamicResource RadioButtonGlyphRadius}" Height="{DynamicResource RadioButtonGlyphRadius}"
Fill="{DynamicResource RadioButtonCheckGlyphFill}" Fill="{DynamicResource RadioButtonCheckGlyphFill}"
Opacity="0"
Stroke="{DynamicResource RadioButtonCheckGlyphFill}" Stroke="{DynamicResource RadioButtonCheckGlyphFill}"
StrokeThickness="0"
UseLayoutRounding="False" /> UseLayoutRounding="False" />
</Grid> </Panel>
<ContentPresenter <ContentPresenter
Name="PART_ContentPresenter" x:Name="PART_ContentPresenter"
Grid.Column="1" Grid.Column="1"
Margin="{DynamicResource RadioButtonContentMargin}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}" Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
Foreground="{TemplateBinding Foreground}" Foreground="{TemplateBinding Foreground}"
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
TextElement.FontSize="{DynamicResource RadioButtonFontSize}" FontSize="{TemplateBinding FontSize}"
TextElement.Foreground="{DynamicResource RadioButtonForeground}" /> TextWrapping="Wrap" />
</Grid> </Grid>
</Border> </Border>
</ControlTemplate> </ControlTemplate>
@ -307,9 +287,6 @@
<Style Selector="^ /template/ Ellipse#OuterEllipse"> <Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPointeroverBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPointeroverBorderBrush}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="0" />
</Style>
</Style> </Style>
<!-- Unchecked Pressed State --> <!-- Unchecked Pressed State -->
@ -318,9 +295,6 @@
<Style Selector="^ /template/ Ellipse#OuterEllipse"> <Style Selector="^ /template/ Ellipse#OuterEllipse">
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPressedBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPressedBorderBrush}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="0" />
</Style>
</Style> </Style>
<!-- Unchecked Disabled state --> <!-- Unchecked Disabled state -->
@ -329,9 +303,6 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDisabledBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDisabledBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDisabledBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="0" />
</Style>
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter"> <Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" /> <Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" />
</Style> </Style>
@ -361,9 +332,6 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointeroverBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointeroverBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointeroverBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointeroverBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="1" />
</Style>
</Style> </Style>
<!-- Checked Pressed State --> <!-- Checked Pressed State -->
@ -373,9 +341,6 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPressedBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPressedBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPressedBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPressedBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="1" />
</Style>
</Style> </Style>
<!-- Checked Disabled State --> <!-- Checked Disabled State -->
@ -384,9 +349,6 @@
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDisabledBorderBrush}" /> <Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDisabledBorderBrush}" />
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" /> <Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
</Style> </Style>
<Style Selector="^ /template/ Ellipse#CheckGlyph">
<Setter Property="Opacity" Value="1" />
</Style>
<Style Selector="^ /template/ Border#RootBorder"> <Style Selector="^ /template/ Border#RootBorder">
<Setter Property="BorderBrush" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" /> <Setter Property="BorderBrush" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
<Setter Property="Background" Value="{DynamicResource RadioButtonCardCheckedBackground}" /> <Setter Property="Background" Value="{DynamicResource RadioButtonCardCheckedBackground}" />
@ -399,21 +361,22 @@
</ControlTheme> </ControlTheme>
<ControlTheme x:Key="PureCardRadioButton" TargetType="RadioButton"> <ControlTheme x:Key="PureCardRadioButton" TargetType="RadioButton">
<Setter Property="RadioButton.CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" /> <Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="RadioButton.Cursor" Value="Hand" /> <Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="RadioButton.VerticalContentAlignment" Value="Center" /> <Setter Property="Padding" Value="{DynamicResource RadioButtonCardPadding}" />
<Setter Property="RadioButton.BorderThickness" Value="1" /> <Setter Property="FontSize" Value="{DynamicResource RadioButtonFontSize}" />
<Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonFontSize}" /> <Setter Property="CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" />
<Setter Property="RadioButton.Padding" Value="{DynamicResource RadioButtonCardPadding}" /> <Setter Property="Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" />
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" /> <Setter Property="BorderThickness" Value="{DynamicResource RadioButtonBorderThickness}" />
<Setter Property="RadioButton.Template"> <Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<ControlTemplate TargetType="RadioButton"> <ControlTemplate TargetType="RadioButton">
<ContentPresenter <ContentPresenter
x:Name="PART_ContentPresenter" x:Name="PART_ContentPresenter"
Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Foreground="{TemplateBinding Foreground}"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" BorderThickness="{TemplateBinding BorderThickness}"
@ -421,7 +384,8 @@
ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplate="{TemplateBinding ContentTemplate}"
CornerRadius="{TemplateBinding CornerRadius}" CornerRadius="{TemplateBinding CornerRadius}"
RecognizesAccessKey="True" RecognizesAccessKey="True"
UseLayoutRounding="False" /> UseLayoutRounding="False"
TextWrapping="Wrap" />
</ControlTemplate> </ControlTemplate>
</Setter> </Setter>
<Style Selector="^:unchecked"> <Style Selector="^:unchecked">

View File

@ -2,6 +2,9 @@
<x:Double x:Key="CheckBoxFontSize">14</x:Double> <x:Double x:Key="CheckBoxFontSize">14</x:Double>
<x:Double x:Key="CheckBoxBoxWidth">16</x:Double> <x:Double x:Key="CheckBoxBoxWidth">16</x:Double>
<x:Double x:Key="CheckBoxBoxHeight">16</x:Double> <x:Double x:Key="CheckBoxBoxHeight">16</x:Double>
<Thickness x:Key="CheckBoxBoxMargin">0 2 0 0</Thickness>
<Thickness x:Key="CheckBoxContentMargin">8 0 0 0</Thickness>
<x:Double x:Key="CheckBoxBoxGlyphWidth">10</x:Double> <x:Double x:Key="CheckBoxBoxGlyphWidth">10</x:Double>
<x:Double x:Key="CheckBoxBoxGlyphHeight">10</x:Double> <x:Double x:Key="CheckBoxBoxGlyphHeight">10</x:Double>
@ -12,6 +15,6 @@
<StreamGeometry x:Key="CheckBoxIndeterminateGlyph">M5 12.5C5 11.6716 5.67157 11 6.5 11H17.5C18.3284 11 19 11.6716 19 12.5C19 13.3284 18.3284 14 17.5 14H6.5C5.67157 14 5 13.3284 5 12.5Z</StreamGeometry> <StreamGeometry x:Key="CheckBoxIndeterminateGlyph">M5 12.5C5 11.6716 5.67157 11 6.5 11H17.5C18.3284 11 19 11.6716 19 12.5C19 13.3284 18.3284 14 17.5 14H6.5C5.67157 14 5 13.3284 5 12.5Z</StreamGeometry>
<Thickness x:Key="CheckBoxCardBorderThickness">1</Thickness> <Thickness x:Key="CheckBoxCardBorderThickness">1</Thickness>
<Thickness x:Key="CheckBoxCardPadding">16</Thickness> <Thickness x:Key="CheckBoxCardPadding">16 12</Thickness>
<CornerRadius x:Key="CheckBoxCardCornerRadius">3</CornerRadius> <CornerRadius x:Key="CheckBoxCardCornerRadius">3</CornerRadius>
</ResourceDictionary> </ResourceDictionary>

View File

@ -3,7 +3,10 @@
<x:Double x:Key="RadioButtonIconRadius">16</x:Double> <x:Double x:Key="RadioButtonIconRadius">16</x:Double>
<x:Double x:Key="RadioButtonGlyphRadius">6</x:Double> <x:Double x:Key="RadioButtonGlyphRadius">6</x:Double>
<x:Double x:Key="RadioButtonFontSize">14</x:Double> <x:Double x:Key="RadioButtonFontSize">14</x:Double>
<Thickness x:Key="RadioButtonIconMargin">0 2 8 0</Thickness> <Thickness x:Key="RadioButtonIconMargin">0 2 0 0</Thickness>
<x:Double x:Key="RadioButtonUncheckIconDefaultThickness">1</x:Double>
<Thickness x:Key="RadioButtonContentMargin">8 0 0 0</Thickness>
<!-- ButtonRadioButton --> <!-- ButtonRadioButton -->
<CornerRadius x:Key="RadioButtonBoxCornerRadius">3</CornerRadius> <CornerRadius x:Key="RadioButtonBoxCornerRadius">3</CornerRadius>
@ -21,6 +24,7 @@
<x:Double x:Key="RadioButtonButtonLargeFontSize">14</x:Double> <x:Double x:Key="RadioButtonButtonLargeFontSize">14</x:Double>
<!-- CardRadioButton --> <!-- CardRadioButton -->
<Thickness x:Key="RadioButtonBorderThickness">1</Thickness>
<Thickness x:Key="RadioButtonCardPadding">16 12</Thickness> <Thickness x:Key="RadioButtonCardPadding">16 12</Thickness>
<CornerRadius x:Key="RadioButtonCardCornerRadius">3</CornerRadius> <CornerRadius x:Key="RadioButtonCardCornerRadius">3</CornerRadius>
</ResourceDictionary> </ResourceDictionary>