feat: enhancement.
This commit is contained in:
parent
92c13081f3
commit
e4497df65d
@ -2,17 +2,27 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
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">
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CheckBoxForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CheckBoxDefaultBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="CheckBox">
|
||||
<Border
|
||||
@ -50,8 +60,8 @@
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
RecognizesAccessKey="True"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
RecognizesAccessKey="True"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</Border>
|
||||
@ -175,14 +185,14 @@
|
||||
<ControlTheme x:Key="SimpleCheckBox" TargetType="CheckBox">
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CheckBoxForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CheckBoxDefaultBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxDefaultBorderBrush}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxBoxCornerRadius}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="CheckBox">
|
||||
<Border
|
||||
@ -322,27 +332,31 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="CardCheckBox" 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="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="CheckBox">
|
||||
<Border
|
||||
Name="RootBorder"
|
||||
x:Name="RootBorder"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid
|
||||
x:Name="RootGrid"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
ColumnDefinitions="Auto,*">
|
||||
<Grid Grid.Column="0" VerticalAlignment="Top">
|
||||
<Panel
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Top"
|
||||
Margin="{DynamicResource CheckBoxBoxMargin}">
|
||||
<Border
|
||||
x:Name="NormalRectangle"
|
||||
Width="{DynamicResource CheckBoxBoxWidth}"
|
||||
@ -353,21 +367,23 @@
|
||||
CornerRadius="{DynamicResource CheckBoxBoxCornerRadius}"
|
||||
UseLayoutRounding="False" />
|
||||
<PathIcon
|
||||
Name="CheckGlyph"
|
||||
x:Name="CheckGlyph"
|
||||
Width="{DynamicResource CheckBoxBoxGlyphWidth}"
|
||||
Height="{DynamicResource CheckBoxBoxGlyphHeight}"
|
||||
Foreground="{DynamicResource CheckBoxGlyphFill}" />
|
||||
</Panel>
|
||||
|
||||
</Grid>
|
||||
<ContentPresenter
|
||||
x:Name="ContentPresenter"
|
||||
x:Name="PART_ContentPresenter"
|
||||
Grid.Column="1"
|
||||
Margin="8,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Margin="{DynamicResource CheckBoxContentMargin}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
IsVisible="{TemplateBinding Content,
|
||||
Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
RecognizesAccessKey="True"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
@ -397,7 +413,7 @@
|
||||
|
||||
<!-- Unchecked Disabled state -->
|
||||
<Style Selector="^:disabled">
|
||||
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||
@ -448,7 +464,7 @@
|
||||
<Style Selector="^ /template/ Border#RootBorder">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||
@ -503,7 +519,7 @@
|
||||
<Style Selector="^ /template/ Border#RootBorder">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxCardCheckedDisabledBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ ContentPresenter#ContentPresenter">
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CheckBoxDisabledForeground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#NormalRectangle">
|
||||
@ -519,20 +535,22 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="PureCardCheckBox" TargetType="CheckBox">
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Padding" Value="{DynamicResource CheckBoxCardPadding}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource CheckBoxFontSize}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CheckBoxCardCornerRadius}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource CheckBoxCardBorderThickness}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="CheckBox">
|
||||
<ContentPresenter
|
||||
x:Name="PART_ContentPresenter"
|
||||
Margin="{TemplateBinding Margin}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
@ -540,7 +558,8 @@
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
RecognizesAccessKey="True"
|
||||
UseLayoutRounding="False" />
|
||||
UseLayoutRounding="False"
|
||||
TextWrapping="Wrap" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
|
@ -3,31 +3,27 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:CompileBindings="True">
|
||||
<Design.PreviewWith>
|
||||
<StackPanel Margin="20">
|
||||
<RadioButton>Hello Button2</RadioButton>
|
||||
<RadioButton>Hello Button3</RadioButton>
|
||||
<Border Theme="{StaticResource RadioButtonGroupBorder}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<RadioButton Theme="{StaticResource ButtonRadioButton}">Hello Button2</RadioButton>
|
||||
<RadioButton Theme="{StaticResource ButtonRadioButton}">Hello Button3</RadioButton>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<RadioButton Theme="{StaticResource PureCardRadioButton}">Hello Button3</RadioButton>
|
||||
<RadioButton Theme="{StaticResource PureCardRadioButton}">Hello Button3</RadioButton>
|
||||
</StackPanel>
|
||||
<ThemeVariantScope RequestedThemeVariant="Dark">
|
||||
<StackPanel Background="{DynamicResource SemiBackground0Color}">
|
||||
<RadioButton>Hello</RadioButton>
|
||||
<RadioButton>Hello</RadioButton>
|
||||
<RadioButton Theme="{DynamicResource CardRadioButton}">Hello</RadioButton>
|
||||
<RadioButton Theme="{DynamicResource PureCardRadioButton}">Hello</RadioButton>
|
||||
</StackPanel>
|
||||
</ThemeVariantScope>
|
||||
</Design.PreviewWith>
|
||||
<!-- Theme: Default, Button, Card, PureCard -->
|
||||
<ControlTheme x:Key="{x:Type RadioButton}" TargetType="RadioButton">
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource RadioButtonFontSize}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonBoxCornerRadius}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource RadioButtonForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource RadioButtonDefaultBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource RadioButtonDefaultBorderBrush}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonBoxCornerRadius}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="RadioButton">
|
||||
<Border
|
||||
@ -68,8 +64,8 @@
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
RecognizesAccessKey="True"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
RecognizesAccessKey="True"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</Border>
|
||||
@ -159,14 +155,14 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="ButtonRadioButton" TargetType="RadioButton">
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonButtonCornerRadius}" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Padding" Value="{DynamicResource RadioButtonButtonDefaultPadding}" />
|
||||
<Setter Property="Margin" Value="2" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="FontWeight" Value="{DynamicResource RadioButtonButtonFontWeight}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource RadioButtonButtonDefaultFontSize}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource RadioButtonButtonDefaultPadding}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource RadioButtonButtonUncheckedForeground}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonButtonCornerRadius}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="RadioButton">
|
||||
<ContentPresenter
|
||||
@ -214,21 +210,18 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="CardRadioButton" TargetType="RadioButton">
|
||||
<Setter Property="Padding" Value="{DynamicResource RadioButtonCardPadding}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource RadioButtonCardPadding}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource RadioButtonFontSize}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" />
|
||||
<Setter Property="Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource RadioButtonBorderThickness}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="RadioButton">
|
||||
<Border
|
||||
Name="RootBorder"
|
||||
Margin="{TemplateBinding Margin}"
|
||||
x:Name="RootBorder"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
@ -238,9 +231,12 @@
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
ColumnDefinitions="Auto,*">
|
||||
<Grid Margin="{DynamicResource RadioButtonIconMargin}" VerticalAlignment="Top">
|
||||
<Panel
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Top"
|
||||
Margin="{DynamicResource RadioButtonIconMargin}">
|
||||
<Ellipse
|
||||
Name="OuterEllipse"
|
||||
x:Name="OuterEllipse"
|
||||
Width="{DynamicResource RadioButtonIconRadius}"
|
||||
Height="{DynamicResource RadioButtonIconRadius}"
|
||||
Fill="{DynamicResource RadioButtonUncheckIconDefaultBackground}"
|
||||
@ -249,26 +245,27 @@
|
||||
UseLayoutRounding="False" />
|
||||
|
||||
<Ellipse
|
||||
Name="CheckGlyph"
|
||||
x:Name="CheckGlyph"
|
||||
Width="{DynamicResource RadioButtonGlyphRadius}"
|
||||
Height="{DynamicResource RadioButtonGlyphRadius}"
|
||||
Fill="{DynamicResource RadioButtonCheckGlyphFill}"
|
||||
Opacity="0"
|
||||
Stroke="{DynamicResource RadioButtonCheckGlyphFill}"
|
||||
StrokeThickness="0"
|
||||
UseLayoutRounding="False" />
|
||||
</Grid>
|
||||
</Panel>
|
||||
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
x:Name="PART_ContentPresenter"
|
||||
Grid.Column="1"
|
||||
Margin="{DynamicResource RadioButtonContentMargin}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsVisible="{TemplateBinding Content,Converter={x:Static ObjectConverters.IsNotNull}}"
|
||||
RecognizesAccessKey="True"
|
||||
TextElement.FontSize="{DynamicResource RadioButtonFontSize}"
|
||||
TextElement.Foreground="{DynamicResource RadioButtonForeground}" />
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
@ -290,9 +287,6 @@
|
||||
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
||||
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPointeroverBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Unchecked Pressed State -->
|
||||
@ -301,9 +295,6 @@
|
||||
<Style Selector="^ /template/ Ellipse#OuterEllipse">
|
||||
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconPressedBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Unchecked Disabled state -->
|
||||
@ -312,9 +303,6 @@
|
||||
<Setter Property="Stroke" Value="{DynamicResource RadioButtonUncheckIconDisabledBorderBrush}" />
|
||||
<Setter Property="Fill" Value="{DynamicResource RadioButtonUncheckIconDisabledBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource RadioButtonDisabledForeground}" />
|
||||
</Style>
|
||||
@ -344,9 +332,6 @@
|
||||
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPointeroverBorderBrush}" />
|
||||
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPointeroverBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Checked Pressed State -->
|
||||
@ -356,9 +341,6 @@
|
||||
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconPressedBorderBrush}" />
|
||||
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconPressedBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<!-- Checked Disabled State -->
|
||||
@ -367,9 +349,6 @@
|
||||
<Setter Property="Stroke" Value="{DynamicResource RadioButtonCheckIconDisabledBorderBrush}" />
|
||||
<Setter Property="Fill" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Ellipse#CheckGlyph">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Border#RootBorder">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource RadioButtonCheckIconDisabledBackground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource RadioButtonCardCheckedBackground}" />
|
||||
@ -382,21 +361,22 @@
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme x:Key="PureCardRadioButton" TargetType="RadioButton">
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource RadioButtonFontSize}" />
|
||||
<Setter Property="Padding" Value="{DynamicResource RadioButtonCardPadding}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource RadioButtonFontSize}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource RadioButtonCardCornerRadius}" />
|
||||
<Setter Property="Background" Value="{DynamicResource RadioButtonCardDefaultBackground}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource RadioButtonBorderThickness}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="RadioButton">
|
||||
<ContentPresenter
|
||||
x:Name="PART_ContentPresenter"
|
||||
Margin="{TemplateBinding Margin}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
@ -404,7 +384,8 @@
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
RecognizesAccessKey="True"
|
||||
UseLayoutRounding="False" />
|
||||
UseLayoutRounding="False"
|
||||
TextWrapping="Wrap" />
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:unchecked">
|
||||
|
@ -2,6 +2,7 @@
|
||||
<x:Double x:Key="CheckBoxFontSize">14</x:Double>
|
||||
<x:Double x:Key="CheckBoxBoxWidth">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>
|
||||
@ -14,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>
|
||||
|
||||
<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>
|
||||
</ResourceDictionary>
|
@ -3,7 +3,7 @@
|
||||
<x:Double x:Key="RadioButtonIconRadius">16</x:Double>
|
||||
<x:Double x:Key="RadioButtonGlyphRadius">6</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>
|
||||
@ -24,6 +24,7 @@
|
||||
<x:Double x:Key="RadioButtonButtonLargeFontSize">14</x:Double>
|
||||
|
||||
<!-- CardRadioButton -->
|
||||
<Thickness x:Key="RadioButtonBorderThickness">1</Thickness>
|
||||
<Thickness x:Key="RadioButtonCardPadding">16 12</Thickness>
|
||||
<CornerRadius x:Key="RadioButtonCardCornerRadius">3</CornerRadius>
|
||||
</ResourceDictionary>
|
Loading…
x
Reference in New Issue
Block a user