feat: disabled ButtonRadioButton style.

This commit is contained in:
Zhang Dian 2023-03-27 19:43:11 +08:00
parent e79044b040
commit 3124c5e2cc
3 changed files with 13 additions and 8 deletions

View File

@ -195,15 +195,18 @@
UseLayoutRounding="False" />
</ControlTemplate>
</Setter>
<Style Selector="^:checked">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonButtonCheckedBackground}" />
<Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonButtonCheckedForeground}" />
</Style>
<Style Selector="^:unchecked">
<Setter Property="RadioButton.Background" Value="Transparent" />
<Style Selector="^:pointerover">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonButtonUncheckedPointeroverBackground}" />
</Style>
<Style Selector="^:disabled">
<Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonButtonUncheckedDisabledForeground}" />
</Style>
</Style>
<Style Selector="^:checked">
<Setter Property="RadioButton.Background" Value="{DynamicResource RadioButtonButtonCheckedBackground}" />
<Setter Property="RadioButton.Foreground" Value="{DynamicResource RadioButtonButtonCheckedForeground}" />
</Style>
<Style Selector="^.Small">
<Setter Property="RadioButton.FontSize" Value="{DynamicResource RadioButtonButtonSmallFontSize}" />

View File

@ -47,10 +47,11 @@
<sys:Double x:Key="RadioButtonButtonDefaultFontSize">12</sys:Double>
<sys:Double x:Key="RadioButtonButtonLargeFontSize">14</sys:Double>
<SolidColorBrush x:Key="RadioButtonButtonCheckedForeground" Color="#54A9FF" />
<SolidColorBrush x:Key="RadioButtonButtonUncheckedPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="RadioButtonButtonUncheckedForeground" Opacity="0.8" Color="#F9F9F9" />
<SolidColorBrush x:Key="RadioButtonButtonUncheckedPointeroverBackground" Opacity="0.16" Color="White" />
<SolidColorBrush x:Key="RadioButtonButtonUncheckedDisabledForeground" Color="#78787A" />
<SolidColorBrush x:Key="RadioButtonButtonCheckedBackground" Color="#43444A" />
<SolidColorBrush x:Key="RadioButtonButtonCheckedForeground" Color="#54A9FF" />
<Thickness x:Key="RadioButtonCardPadding">16 12</Thickness>

View File

@ -47,9 +47,10 @@
<sys:Double x:Key="RadioButtonButtonDefaultFontSize">12</sys:Double>
<sys:Double x:Key="RadioButtonButtonLargeFontSize">14</sys:Double>
<SolidColorBrush x:Key="RadioButtonButtonCheckedForeground" Color="#0077FA" />
<SolidColorBrush x:Key="RadioButtonButtonUncheckedPointeroverBackground" Opacity="0.09" Color="#2E3238" />
<SolidColorBrush x:Key="RadioButtonButtonUncheckedForeground" Opacity="0.8" Color="#1C1F23" />
<SolidColorBrush x:Key="RadioButtonButtonUncheckedPointeroverBackground" Opacity="0.09" Color="#2E3238" />
<SolidColorBrush x:Key="RadioButtonButtonUncheckedDisabledForeground" Color="#A9AAAB" />
<SolidColorBrush x:Key="RadioButtonButtonCheckedForeground" Color="#0077FA" />
<SolidColorBrush x:Key="RadioButtonButtonCheckedBackground" Color="White" />
<Thickness x:Key="RadioButtonCardPadding">16 12</Thickness>