fix: disabled Styles.
This commit is contained in:
parent
318f9fb510
commit
48ea283c65
@ -8,7 +8,7 @@
|
|||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<StackPanel Spacing="20">
|
<StackPanel Spacing="20">
|
||||||
<TextBlock Text="Toggle Button" />
|
<TextBlock Text="Toggle Button (Default)" />
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<ToggleButton Classes="Primary">Primary</ToggleButton>
|
<ToggleButton Classes="Primary">Primary</ToggleButton>
|
||||||
<ToggleButton Classes="Secondary">Secondary</ToggleButton>
|
<ToggleButton Classes="Secondary">Secondary</ToggleButton>
|
||||||
@ -17,6 +17,15 @@
|
|||||||
<ToggleButton Classes="Danger">Danger</ToggleButton>
|
<ToggleButton Classes="Danger">Danger</ToggleButton>
|
||||||
<ToggleButton Classes="Danger" IsEnabled="False">Danger</ToggleButton>
|
<ToggleButton Classes="Danger" IsEnabled="False">Danger</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<TextBlock Text="Toggle Button Checked State" />
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
|
<ToggleButton Classes="Primary" IsChecked="True">Primary</ToggleButton>
|
||||||
|
<ToggleButton Classes="Secondary" IsChecked="True">Secondary</ToggleButton>
|
||||||
|
<ToggleButton Classes="Tertiary" IsChecked="True">Tertiary</ToggleButton>
|
||||||
|
<ToggleButton Classes="Warning" IsChecked="True">Warning</ToggleButton>
|
||||||
|
<ToggleButton Classes="Danger" IsChecked="True">Danger</ToggleButton>
|
||||||
|
<ToggleButton Classes="Danger" IsChecked="True" IsEnabled="False">Danger</ToggleButton>
|
||||||
|
</StackPanel>
|
||||||
<TextBlock Text="Toggle Button Three State" />
|
<TextBlock Text="Toggle Button Three State" />
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<ToggleButton Classes="Primary" IsThreeState="True" IsChecked="{x:Null}">Primary</ToggleButton>
|
<ToggleButton Classes="Primary" IsThreeState="True" IsChecked="{x:Null}">Primary</ToggleButton>
|
||||||
|
@ -62,6 +62,10 @@
|
|||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDefaultPressedBackground}" />
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDefaultPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Primary">
|
<Style Selector="^.Primary">
|
||||||
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultPrimaryForeground}" />
|
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultPrimaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
@ -132,7 +136,11 @@
|
|||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDangerCheckedPressedBackground}" />
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDangerCheckedPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
|
||||||
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:indeterminate">
|
<Style Selector="^:indeterminate">
|
||||||
<Setter Property="ToggleButton.BorderThickness" Value="1" />
|
<Setter Property="ToggleButton.BorderThickness" Value="1" />
|
||||||
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminateBorderBrush}" />
|
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminateBorderBrush}" />
|
||||||
@ -198,10 +206,12 @@
|
|||||||
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDangerIndeterminatePressedForeground}" />
|
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDangerIndeterminatePressedForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^:disabled">
|
||||||
|
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonIndeterminateDisabledBorderBrush}" />
|
||||||
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^:disabled">
|
<Style Selector="^:disabled">
|
||||||
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonDefaultDisabledBorderBrush}" />
|
|
||||||
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultDisabledForeground}" />
|
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultDisabledForeground}" />
|
||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDefaultDisabledBackground}" />
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDefaultDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.12" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.12" Color="White" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.16" Color="White" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.20" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.20" Color="White" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBackground" Opacity="0.12" Color="White" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBackground" Opacity="0.04" Color="#E6E8EA" />
|
||||||
|
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBorderBrush" Color="Transparent" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultBorderBrush" Color="Transparent" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultBorderBrush" Color="Transparent" />
|
||||||
|
|
||||||
@ -24,7 +25,7 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Color="#888D92" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Color="#888D92" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FFAE43" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FFAE43" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#FC725A" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#FC725A" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Color="#2E3238" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#F9F9F9" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonPrimaryCheckedBackground" Color="#54A9FF" />
|
<SolidColorBrush x:Key="ToggleButtonPrimaryCheckedBackground" Color="#54A9FF" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonSecondaryCheckedBackground" Color="#40B4F3" />
|
<SolidColorBrush x:Key="ToggleButtonSecondaryCheckedBackground" Color="#40B4F3" />
|
||||||
@ -63,6 +64,7 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminatePointeroverBorderBrush" Color="#A7ABB0" />
|
<SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminatePointeroverBorderBrush" Color="#A7ABB0" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonWarningIndeterminatePointeroverBorderBrush" Color="#FFC772" />
|
<SolidColorBrush x:Key="ToggleButtonWarningIndeterminatePointeroverBorderBrush" Color="#FFC772" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDangerIndeterminatePointeroverBorderBrush" Color="#FD9983" />
|
<SolidColorBrush x:Key="ToggleButtonDangerIndeterminatePointeroverBorderBrush" Color="#FD9983" />
|
||||||
|
<SolidColorBrush x:Key="ToggleButtonIndeterminateDisabledBorderBrush" Opacity="0.35" Color="#F9F9F9" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminatePressedBorderBrush" Color="#A9D7FF" />
|
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminatePressedBorderBrush" Color="#A9D7FF" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminatePressedBorderBrush" Color="#9DDCF9" />
|
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminatePressedBorderBrush" Color="#9DDCF9" />
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.05" Color="#2E3238" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultBackground" Opacity="0.05" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPointeroverBackground" Opacity="0.09" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.13" Color="#2E3238" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultPressedBackground" Opacity="0.13" Color="#2E3238" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBackground" Opacity="0.05" Color="#2E3238" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBackground" Color="#E6E8EA" />
|
||||||
|
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledBorderBrush" Color="Transparent" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultBorderBrush" Color="Transparent" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultBorderBrush" Color="Transparent" />
|
||||||
|
|
||||||
@ -24,7 +25,7 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Color="#6B7075" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultTertiaryForeground" Color="#6B7075" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FC8800" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultWarningForeground" Color="#FC8800" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#F93920" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDangerForeground" Color="#F93920" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Color="#E6E8EA" />
|
<SolidColorBrush x:Key="ToggleButtonDefaultDisabledForeground" Opacity="0.35" Color="#1C1F23" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonPrimaryCheckedBackground" Color="#0077FA" />
|
<SolidColorBrush x:Key="ToggleButtonPrimaryCheckedBackground" Color="#0077FA" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonSecondaryCheckedBackground" Color="#0095EE" />
|
<SolidColorBrush x:Key="ToggleButtonSecondaryCheckedBackground" Color="#0095EE" />
|
||||||
@ -63,6 +64,7 @@
|
|||||||
<SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminatePointeroverBorderBrush" Color="#555B61" />
|
<SolidColorBrush x:Key="ToggleButtonTertiaryIndeterminatePointeroverBorderBrush" Color="#555B61" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonWarningIndeterminatePointeroverBorderBrush" Color="#D26700" />
|
<SolidColorBrush x:Key="ToggleButtonWarningIndeterminatePointeroverBorderBrush" Color="#D26700" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonDangerIndeterminatePointeroverBorderBrush" Color="#D52515" />
|
<SolidColorBrush x:Key="ToggleButtonDangerIndeterminatePointeroverBorderBrush" Color="#D52515" />
|
||||||
|
<SolidColorBrush x:Key="ToggleButtonIndeterminateDisabledBorderBrush" Opacity="0.35" Color="#1C1F23" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminatePressedBorderBrush" Color="#004FB3" />
|
<SolidColorBrush x:Key="ToggleButtonPrimaryIndeterminatePressedBorderBrush" Color="#004FB3" />
|
||||||
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminatePressedBorderBrush" Color="#0063A7" />
|
<SolidColorBrush x:Key="ToggleButtonSecondaryIndeterminatePressedBorderBrush" Color="#0063A7" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user