Introduced resources to be able to properly resize Checkbox and RadioButton in the Compact density of the Fluent theme. (#19882)
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
</Design.PreviewWith>
|
||||
|
||||
<StreamGeometry x:Key="CheckMarkPathData">M5.5 10.586 1.707 6.793A1 1 0 0 0 .293 8.207l4.5 4.5a1 1 0 0 0 1.414 0l11-11A1 1 0 0 0 15.793.293L5.5 10.586Z</StreamGeometry>
|
||||
<x:Double x:Key="CheckBoxMinHeight">32</x:Double>
|
||||
|
||||
<ControlTheme x:Key="{x:Type CheckBox}" TargetType="CheckBox">
|
||||
<Setter Property="Padding" Value="8,0,0,0" />
|
||||
@@ -21,7 +22,7 @@
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
||||
<Setter Property="MinHeight" Value="32" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource CheckBoxMinHeight}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CheckBoxForegroundUnchecked}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CheckBoxBackgroundUnchecked}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushUnchecked}" />
|
||||
@@ -35,7 +36,7 @@
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}" />
|
||||
|
||||
<Grid VerticalAlignment="Top" Height="32">
|
||||
<Grid VerticalAlignment="Top" Height="{DynamicResource CheckBoxMinHeight}">
|
||||
<Border x:Name="NormalRectangle"
|
||||
BorderBrush="{DynamicResource CheckBoxCheckBackgroundStrokeUnchecked}"
|
||||
Background="{DynamicResource CheckBoxCheckBackgroundFillUnchecked}"
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<x:Double x:Key="RadioButtonMinHeight">32</x:Double>
|
||||
|
||||
<ControlTheme x:Key="{x:Type RadioButton}" TargetType="RadioButton">
|
||||
<Setter Property="Background" Value="{DynamicResource RadioButtonBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource RadioButtonForeground}" />
|
||||
@@ -30,7 +32,7 @@
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid ColumnDefinitions="20,*">
|
||||
<Grid Height="32" VerticalAlignment="Top">
|
||||
<Grid Height="{DynamicResource RadioButtonMinHeight}" VerticalAlignment="Top">
|
||||
|
||||
<Ellipse
|
||||
Name="OuterEllipse"
|
||||
|
||||
@@ -21,4 +21,6 @@
|
||||
<x:Double x:Key="TabItemMinHeight">28</x:Double>
|
||||
<Thickness x:Key="TabItemHeaderMargin">6, 0</Thickness>
|
||||
<Thickness x:Key="ButtonPadding">6,4</Thickness>
|
||||
<x:Double x:Key="CheckBoxMinHeight">24</x:Double>
|
||||
<x:Double x:Key="RadioButtonMinHeight">24</x:Double>
|
||||
</ResourceDictionary>
|
||||
|
||||
Reference in New Issue
Block a user