mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-04-15 21:56:36 +08:00
fix: add missing Primary Classes.
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
<StackPanel Spacing="20">
|
<StackPanel Spacing="20">
|
||||||
<TextBlock Text="Toggle Button" />
|
<TextBlock Text="Toggle Button" />
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<ToggleButton>Primary</ToggleButton>
|
<ToggleButton Classes="Primary">Primary</ToggleButton>
|
||||||
<ToggleButton Classes="Secondary">Secondary</ToggleButton>
|
<ToggleButton Classes="Secondary">Secondary</ToggleButton>
|
||||||
<ToggleButton Classes="Tertiary">Tertiary</ToggleButton>
|
<ToggleButton Classes="Tertiary">Tertiary</ToggleButton>
|
||||||
<ToggleButton Classes="Warning">Warning</ToggleButton>
|
<ToggleButton Classes="Warning">Warning</ToggleButton>
|
||||||
@@ -19,12 +19,12 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Text="Toggle Button Three State" />
|
<TextBlock Text="Toggle Button Three State" />
|
||||||
<StackPanel Orientation="Horizontal" Spacing="20">
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
||||||
<ToggleButton IsThreeState="True" IsChecked="{x:Null}">Primary</ToggleButton>
|
<ToggleButton Classes="Primary" IsThreeState="True" IsChecked="{x:Null}">Primary</ToggleButton>
|
||||||
<ToggleButton Classes="Secondary" IsThreeState="True" IsChecked="{x:Null}">Secondary</ToggleButton>
|
<ToggleButton Classes="Secondary" IsThreeState="True" IsChecked="{x:Null}">Secondary</ToggleButton>
|
||||||
<ToggleButton Classes="Tertiary" IsThreeState="True" IsChecked="{x:Null}">Tertiary</ToggleButton>
|
<ToggleButton Classes="Tertiary" IsThreeState="True" IsChecked="{x:Null}">Tertiary</ToggleButton>
|
||||||
<ToggleButton Classes="Warning" IsThreeState="True" IsChecked="{x:Null}">Warning</ToggleButton>
|
<ToggleButton Classes="Warning" IsThreeState="True" IsChecked="{x:Null}">Warning</ToggleButton>
|
||||||
<ToggleButton Classes="Danger" IsThreeState="True" IsChecked="{x:Null}">Danger</ToggleButton>
|
<ToggleButton Classes="Danger" IsThreeState="True" IsChecked="{x:Null}">Danger</ToggleButton>
|
||||||
<ToggleButton Classes="Danger" IsEnabled="False" IsChecked="{x:Null}" IsThreeState="True">Danger</ToggleButton>
|
<ToggleButton Classes="Danger" IsThreeState="True" IsChecked="{x:Null}" IsEnabled="False">Danger</ToggleButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -4,13 +4,13 @@
|
|||||||
x:CompileBindings="True">
|
x:CompileBindings="True">
|
||||||
<Design.PreviewWith>
|
<Design.PreviewWith>
|
||||||
<StackPanel Margin="20">
|
<StackPanel Margin="20">
|
||||||
<ToggleButton>Toggle</ToggleButton>
|
<ToggleButton Classes="Primary">Toggle</ToggleButton>
|
||||||
<ToggleButton Classes="Secondary">Toggle</ToggleButton>
|
<ToggleButton Classes="Secondary">Toggle</ToggleButton>
|
||||||
<ToggleButton Classes="Tertiary">Toggle</ToggleButton>
|
<ToggleButton Classes="Tertiary">Toggle</ToggleButton>
|
||||||
<ToggleButton Classes="Warning">Toggle</ToggleButton>
|
<ToggleButton Classes="Warning">Toggle</ToggleButton>
|
||||||
<ToggleButton Classes="Danger">Toggle</ToggleButton>
|
<ToggleButton Classes="Danger">Toggle</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton IsThreeState="True">Toggle 3</ToggleButton>
|
<ToggleButton Classes="Primary" IsThreeState="True">Toggle 3</ToggleButton>
|
||||||
<ToggleButton Classes="Secondary" IsThreeState="True">Toggle 3</ToggleButton>
|
<ToggleButton Classes="Secondary" IsThreeState="True">Toggle 3</ToggleButton>
|
||||||
<ToggleButton Classes="Tertiary" IsThreeState="True">Toggle 3</ToggleButton>
|
<ToggleButton Classes="Tertiary" IsThreeState="True">Toggle 3</ToggleButton>
|
||||||
<ToggleButton Classes="Warning" IsThreeState="True">Toggle 3</ToggleButton>
|
<ToggleButton Classes="Warning" IsThreeState="True">Toggle 3</ToggleButton>
|
||||||
@@ -73,6 +73,9 @@
|
|||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDefaultDisabledBackground}" />
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonDefaultDisabledBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="^.Primary">
|
||||||
|
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultPrimaryForeground}" />
|
||||||
|
</Style>
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultSecondaryForeground}" />
|
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonDefaultSecondaryForeground}" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -89,6 +92,9 @@
|
|||||||
<Style Selector="^:checked">
|
<Style Selector="^:checked">
|
||||||
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonCheckedForeground}" />
|
<Setter Property="ToggleButton.Foreground" Value="{DynamicResource ToggleButtonCheckedForeground}" />
|
||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedBackground}" />
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedBackground}" />
|
||||||
|
<Style Selector="^.Primary">
|
||||||
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedBackground}" />
|
||||||
|
</Style>
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryCheckedBackground}" />
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryCheckedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -103,6 +109,9 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPointeroverBackground}" />
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPointeroverBackground}" />
|
||||||
|
<Style Selector="^.Primary">
|
||||||
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPointeroverBackground}" />
|
||||||
|
</Style>
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryCheckedPointeroverBackground}" />
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryCheckedPointeroverBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -118,6 +127,9 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed">
|
||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPressedBackground}" />
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPressedBackground}" />
|
||||||
|
<Style Selector="^.Primary">
|
||||||
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryCheckedPressedBackground}" />
|
||||||
|
</Style>
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryCheckedPressedBackground}" />
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryCheckedPressedBackground}" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -136,6 +148,10 @@
|
|||||||
<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}" />
|
||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryIndeterminateBackground}" />
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryIndeterminateBackground}" />
|
||||||
|
<Style Selector="^.Primary">
|
||||||
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonPrimaryIndeterminateBackground}" />
|
||||||
|
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminateBorderBrush}" />
|
||||||
|
</Style>
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryIndeterminateBackground}" />
|
<Setter Property="ToggleButton.Background" Value="{DynamicResource ToggleButtonSecondaryIndeterminateBackground}" />
|
||||||
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSecondaryIndeterminateBorderBrush}" />
|
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSecondaryIndeterminateBorderBrush}" />
|
||||||
@@ -154,6 +170,9 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pointerover">
|
<Style Selector="^:pointerover">
|
||||||
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePointeroverBorderBrush}" />
|
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePointeroverBorderBrush}" />
|
||||||
|
<Style Selector="^.Primary">
|
||||||
|
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePointeroverBorderBrush}" />
|
||||||
|
</Style>
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSecondaryIndeterminatePointeroverBorderBrush}" />
|
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSecondaryIndeterminatePointeroverBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -169,6 +188,9 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:pressed">
|
<Style Selector="^:pressed">
|
||||||
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePressedBorderBrush}" />
|
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePressedBorderBrush}" />
|
||||||
|
<Style Selector="^.Primary">
|
||||||
|
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonPrimaryIndeterminatePressedBorderBrush}" />
|
||||||
|
</Style>
|
||||||
<Style Selector="^.Secondary">
|
<Style Selector="^.Secondary">
|
||||||
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSecondaryIndeterminatePressedBorderBrush}" />
|
<Setter Property="ToggleButton.BorderBrush" Value="{DynamicResource ToggleButtonSecondaryIndeterminatePressedBorderBrush}" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|||||||
Reference in New Issue
Block a user