feat: ToggleButton & ToggleSplitButton :checked.
This commit is contained in:
parent
1378219b7a
commit
4f685c712a
@ -82,7 +82,14 @@
|
||||
Disabled
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="Toggle Button Disabled State" />
|
||||
<StackPanel Background="{DynamicResource SemiColorBackground1}" Orientation="Horizontal" Spacing="20">
|
||||
<ToggleButton IsThreeState="True" IsEnabled="False">Default</ToggleButton>
|
||||
<ToggleButton IsThreeState="True" IsEnabled="False" IsChecked="True">Checked</ToggleButton>
|
||||
<ToggleButton IsThreeState="True" IsEnabled="False" IsChecked="{x:Null}">Indeterminate</ToggleButton>
|
||||
</StackPanel>
|
||||
<TextBlock Text="Toggle Button Size" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||
<ToggleButton Classes="Small" IsThreeState="True">Small</ToggleButton>
|
||||
<ToggleButton IsThreeState="True">Default</ToggleButton>
|
||||
<ToggleButton Classes="Large" IsThreeState="True">Large</ToggleButton>
|
||||
|
@ -221,6 +221,10 @@
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonDefaultBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ButtonDefaultDisabledForeground}" />
|
||||
</Style>
|
||||
<!-- only for ToggleSplitButton -->
|
||||
<Style Selector="^:checked:disabled /template/ Button">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonSolidDisabledBackground}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
<ControlTheme
|
||||
|
@ -73,6 +73,7 @@
|
||||
|
||||
<Style Selector="^:disabled">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ToggleButtonDefaultBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Primary">
|
||||
@ -159,6 +160,7 @@
|
||||
</Style>
|
||||
<Style Selector="^:disabled">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ToggleButtonCheckedDisabledBackground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
@ -248,12 +250,12 @@
|
||||
</Style>
|
||||
<Style Selector="^:disabled">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonIndeterminateDisabledBorderBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ToggleButtonDefaultBackground}" />
|
||||
</Style>
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:disabled">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonDefaultDisabledForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ToggleButtonDefaultDisabledBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Large">
|
||||
|
@ -2,7 +2,6 @@
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.12" Color="White" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.20" Color="White" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||
|
||||
@ -10,7 +9,7 @@
|
||||
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#54A9FF" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultSecondaryForeground" Color="#40B4F3" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Color="#888D92" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Opacity="0.8" Color="#F9F9F9" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultSuccessForeground" Color="#5DC264" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FFAE43" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#FC725A" />
|
||||
@ -37,6 +36,7 @@
|
||||
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#FDBEAC" />
|
||||
|
||||
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
|
||||
<SolidColorBrush x:Key="ToggleButtonCheckedDisabledBackground" Color="#2E3238" />
|
||||
|
||||
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#053170" />
|
||||
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#003761" />
|
||||
|
@ -2,7 +2,6 @@
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.05" Color="#2E3238" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.13" Color="#2E3238" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBackground" Color="#E6E8EA" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBorderBrush" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#1C1F23" />
|
||||
|
||||
@ -10,7 +9,7 @@
|
||||
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultPrimaryForeground" Color="#0077FA" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultSecondaryForeground" Color="#0095EE" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Color="#6B7075" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Opacity="0.8" Color="#1C1F23" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultSuccessForeground" Color="#3BB346" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FC8800" />
|
||||
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#F93920" />
|
||||
@ -37,6 +36,7 @@
|
||||
<SolidColorBrush x:Key="ToggleButtonDangerCheckedPressedBackground" Color="#B2140C" />
|
||||
|
||||
<SolidColorBrush x:Key="ToggleButtonCheckedForeground" Color="White" />
|
||||
<SolidColorBrush x:Key="ToggleButtonCheckedDisabledBackground" Color="#E6E8EA" />
|
||||
|
||||
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminateBackground" Color="#EAF5FF" />
|
||||
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminateBackground" Color="#E9F7FD" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user