chore: add avalonia ToggleButton demo.

This commit is contained in:
NaBian committed 2024-12-01 20:37:37 +08:00
1 parent 4713903b54
commit 00d64d55a0
17 files changed
+1564 -242

No files matched your search

@@ -37,16 +37,16 @@
</WrapPanel>
<WrapPanel>
<StackPanel>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Clock}}" Margin="5" hc:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Clock}}" IsEnabled="False" Margin="5" hc:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Clock}}" IsChecked="True" Margin="5" hc:IconElement.Geometry="{StaticResource ClockGeometry}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Clock}}" IsChecked="True" IsEnabled="False" Margin="5" hc:IconElement.Geometry="{StaticResource ClockGeometry}"/>
</StackPanel>
<StackPanel>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Calendar}}" Margin="5" Style="{StaticResource ToggleButtonPrimary}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Calendar}}" IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonPrimary}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Calendar}}" IsChecked="True" Margin="5" Style="{StaticResource ToggleButtonPrimary}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Calendar}}" IsChecked="True" IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonPrimary}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
</StackPanel>
<StackPanel>
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonSuccess}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}"/>
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonSuccess}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}"/>
<ToggleButton IsChecked="True" Margin="5" Style="{StaticResource ToggleButtonSuccess}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}"/>
<ToggleButton IsChecked="True" IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonSuccess}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}"/>
</StackPanel>
<StackPanel>
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonInfo}" hc:IconElement.Geometry="{StaticResource RotateRightGeometry}"/>
@@ -63,16 +63,16 @@
</WrapPanel>
<WrapPanel>
<StackPanel>
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIcon}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIcon}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsChecked="True" Margin="5" Style="{StaticResource ToggleButtonIcon}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsChecked="True" IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIcon}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
</StackPanel>
<StackPanel>
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIconPrimary}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconPrimary}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsChecked="True" Margin="5" Style="{StaticResource ToggleButtonIconPrimary}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsChecked="True" IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconPrimary}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
</StackPanel>
<StackPanel>
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIconSuccess}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconSuccess}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsChecked="True" Margin="5" Style="{StaticResource ToggleButtonIconSuccess}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsChecked="True" IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconSuccess}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
</StackPanel>
<StackPanel>
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIconInfo}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
@@ -114,15 +114,15 @@
</Border>
</ToggleButton>
</StackPanel>
<StackPanel>
<ToggleButton IsChecked="True" Margin="5,9" HorizontalAlignment="Center" Style="{StaticResource ToggleButtonSwitch}" hc:VisualElement.HighlightBrush="{DynamicResource DangerBrush}"/>
<ToggleButton IsEnabled="False" IsChecked="True" HorizontalAlignment="Center" Margin="5,9" Style="{StaticResource ToggleButtonSwitch}"/>
<StackPanel VerticalAlignment="Center">
<ToggleButton IsChecked="True" Margin="5" HorizontalAlignment="Center" Style="{StaticResource ToggleButtonSwitch}" hc:VisualElement.HighlightBrush="{DynamicResource DangerBrush}"/>
<ToggleButton IsEnabled="False" IsChecked="True" HorizontalAlignment="Center" Margin="5" Style="{StaticResource ToggleButtonSwitch}"/>
</StackPanel>
<StackPanel>
<ToggleButton hc:ToggleButtonAttach.ShowLabel="True" Content="Switch" Margin="5,9" HorizontalAlignment="Center" Style="{StaticResource ToggleButtonSwitch}" hc:VisualElement.HighlightBrush="{DynamicResource DangerBrush}" />
<ToggleButton hc:ToggleButtonAttach.ShowLabel="True" Content="Switch" IsEnabled="False" IsChecked="True" HorizontalAlignment="Center" Margin="5,9" Style="{StaticResource ToggleButtonSwitch}" />
<StackPanel VerticalAlignment="Center">
<ToggleButton hc:ToggleButtonAttach.ShowLabel="True" Content="Switch" Margin="5" HorizontalAlignment="Center" Style="{StaticResource ToggleButtonSwitch}" hc:VisualElement.HighlightBrush="{DynamicResource DangerBrush}" />
<ToggleButton hc:ToggleButtonAttach.ShowLabel="True" Content="Switch" IsEnabled="False" IsChecked="True" HorizontalAlignment="Center" Margin="5" Style="{StaticResource ToggleButtonSwitch}" />
</StackPanel>
<StackPanel>
<StackPanel VerticalAlignment="Center">
<ToggleButton BorderThickness="0" IsChecked="True" Margin="5" HorizontalAlignment="Center" Style="{StaticResource ToggleButtonFlip}">
<hc:StatusSwitchElement.CheckedElement>
<Border Background="{DynamicResource PrimaryBrush}">
@@ -175,16 +175,16 @@
</WrapPanel>
<WrapPanel>
<StackPanel>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Clock}}" Margin="5" hc:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonDefault.Small}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Clock}}" IsEnabled="False" Margin="5" hc:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonDefault.Small}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Clock}}" IsChecked="True" Margin="5" hc:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonDefault.Small}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Clock}}" IsChecked="True" IsEnabled="False" Margin="5" hc:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonDefault.Small}"/>
</StackPanel>
<StackPanel>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Calendar}}" Margin="5" Style="{StaticResource ToggleButtonPrimary.Small}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Calendar}}" IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonPrimary.Small}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Calendar}}" IsChecked="True" Margin="5" Style="{StaticResource ToggleButtonPrimary.Small}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
<ToggleButton Content="{ex:Lang Key={x:Static langs:LangKeys.Calendar}}" IsChecked="True" IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonPrimary.Small}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}"/>
</StackPanel>
<StackPanel>
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonSuccess.Small}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}"/>
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonSuccess.Small}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}"/>
<ToggleButton IsChecked="True" Margin="5" Style="{StaticResource ToggleButtonSuccess.Small}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}"/>
<ToggleButton IsChecked="True" IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonSuccess.Small}" hc:IconElement.Geometry="{StaticResource RotateLeftGeometry}"/>
</StackPanel>
<StackPanel>
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonInfo.Small}" hc:IconElement.Geometry="{StaticResource RotateRightGeometry}"/>
@@ -201,16 +201,16 @@
</WrapPanel>
<WrapPanel>
<StackPanel>
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIcon.Small}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIcon.Small}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsChecked="True" Margin="5" Style="{StaticResource ToggleButtonIcon.Small}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsChecked="True" IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIcon.Small}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
</StackPanel>
<StackPanel>
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIconPrimary.Small}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconPrimary.Small}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsChecked="True" Margin="5" Style="{StaticResource ToggleButtonIconPrimary.Small}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsChecked="True" IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconPrimary.Small}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
</StackPanel>
<StackPanel>
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIconSuccess.Small}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconSuccess.Small}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsChecked="True" Margin="5" Style="{StaticResource ToggleButtonIconSuccess.Small}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
<ToggleButton IsChecked="True" IsEnabled="False" Margin="5" Style="{StaticResource ToggleButtonIconSuccess.Small}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
</StackPanel>
<StackPanel>
<ToggleButton Margin="5" Style="{StaticResource ToggleButtonIconInfo.Small}" hc:IconSwitchElement.Geometry="{StaticResource LeftGeometry}" hc:IconSwitchElement.GeometrySelected="{StaticResource RightGeometry}"/>
@@ -67,7 +67,6 @@
<Path x:Name="PathIcon" Width="{TemplateBinding hc:IconElement.Width}" Height="{TemplateBinding hc:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding hc:IconSwitchElement.Geometry}"/>
</ContentControl>
</Border>
<Border Visibility="Collapsed" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="BorderChecked" BorderThickness="4" BorderBrush="{TemplateBinding BorderBrush}"/>
</hc:SimplePanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
@@ -155,18 +154,10 @@
<Viewbox>
<hc:SimplePanel Width="80" Height="48">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="24" Name="innerBorder">
<hc:ToggleBlock HorizontalAlignment="Right" Margin="0 0 12 0" IsChecked="{Binding Path=(hc:ToggleButtonAttach.ShowLabel),RelativeSource={RelativeSource TemplatedParent}}">
<hc:ToggleBlock.CheckedContent>
<Ellipse Width="16" Height="16" StrokeThickness="2" Stroke="{Binding Path=(hc:VisualElement.HighlightForeground),RelativeSource={RelativeSource TemplatedParent}}" />
</hc:ToggleBlock.CheckedContent>
</hc:ToggleBlock>
<Ellipse HorizontalAlignment="Right" Visibility="{Binding Path=(hc:ToggleButtonAttach.ShowLabel), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" Margin="0 0 12 0" Width="16" Height="16" StrokeThickness="2" Stroke="{Binding Path=(hc:VisualElement.HighlightForeground),RelativeSource={RelativeSource TemplatedParent}}" />
</Border>
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0" x:Name="lightBorder" Background="{Binding Path=(hc:VisualElement.HighlightBrush),RelativeSource={RelativeSource TemplatedParent}}" CornerRadius="24">
<hc:ToggleBlock HorizontalAlignment="Left" Margin="18 0 0 0" IsChecked="{Binding Path=(hc:ToggleButtonAttach.ShowLabel),RelativeSource={RelativeSource TemplatedParent}}">
<hc:ToggleBlock.CheckedContent>
<Rectangle Width="3" Height="16" RadiusX="1.5" RadiusY="1.5" Fill="{DynamicResource TextIconBrush}" />
</hc:ToggleBlock.CheckedContent>
</hc:ToggleBlock>
<Rectangle HorizontalAlignment="Left" Visibility="{Binding Path=(hc:ToggleButtonAttach.ShowLabel), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" Margin="18 0 0 0" Width="2" Height="16" RadiusX="1" RadiusY="1" Fill="{DynamicResource TextIconBrush}" />
</Border>
<Border Margin="2" HorizontalAlignment="Left" CornerRadius="22" Name="thumb" Effect="{StaticResource EffectShadow2}" Background="White" Width="44" Height="44" RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
@@ -22,7 +22,7 @@
<Setter Property="hc:IconElement.Height" Value="12"/>
</Style>
<Style BasedOn="{StaticResource ToggleButtonDefault}" TargetType="ToggleButton"/>
<Style x:Key="{x:Type ToggleButton}" BasedOn="{StaticResource ToggleButtonDefault}" TargetType="ToggleButton"/>
<Style x:Key="ToggleButtonPrimary" BasedOn="{StaticResource ToggleButtonBaseStyle}" TargetType="ToggleButton">
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/>
@@ -1798,7 +1798,6 @@
<Path x:Name="PathIcon" Width="{TemplateBinding hc:IconElement.Width}" Height="{TemplateBinding hc:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding hc:IconSwitchElement.Geometry}" />
</ContentControl>
</Border>
<Border Visibility="Collapsed" CornerRadius="{Binding Path=(hc:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" x:Name="BorderChecked" BorderThickness="4" BorderBrush="{TemplateBinding BorderBrush}" />
</hc:SimplePanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
@@ -1885,18 +1884,10 @@
<Viewbox>
<hc:SimplePanel Width="80" Height="48">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="24" Name="innerBorder">
<hc:ToggleBlock HorizontalAlignment="Right" Margin="0 0 12 0" IsChecked="{Binding Path=(hc:ToggleButtonAttach.ShowLabel),RelativeSource={RelativeSource TemplatedParent}}">
<hc:ToggleBlock.CheckedContent>
<Ellipse Width="16" Height="16" StrokeThickness="2" Stroke="{Binding Path=(hc:VisualElement.HighlightForeground),RelativeSource={RelativeSource TemplatedParent}}" />
</hc:ToggleBlock.CheckedContent>
</hc:ToggleBlock>
<Ellipse HorizontalAlignment="Right" Visibility="{Binding Path=(hc:ToggleButtonAttach.ShowLabel), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" Margin="0 0 12 0" Width="16" Height="16" StrokeThickness="2" Stroke="{Binding Path=(hc:VisualElement.HighlightForeground),RelativeSource={RelativeSource TemplatedParent}}" />
</Border>
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0" x:Name="lightBorder" Background="{Binding Path=(hc:VisualElement.HighlightBrush),RelativeSource={RelativeSource TemplatedParent}}" CornerRadius="24">
<hc:ToggleBlock HorizontalAlignment="Left" Margin="18 0 0 0" IsChecked="{Binding Path=(hc:ToggleButtonAttach.ShowLabel),RelativeSource={RelativeSource TemplatedParent}}">
<hc:ToggleBlock.CheckedContent>
<Rectangle Width="3" Height="16" RadiusX="1.5" RadiusY="1.5" Fill="{DynamicResource TextIconBrush}" />
</hc:ToggleBlock.CheckedContent>
</hc:ToggleBlock>
<Rectangle HorizontalAlignment="Left" Visibility="{Binding Path=(hc:ToggleButtonAttach.ShowLabel), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource Boolean2VisibilityConverter}}" Margin="18 0 0 0" Width="3" Height="16" RadiusX="1.5" RadiusY="1.5" Fill="{DynamicResource TextIconBrush}" />
</Border>
<Border Margin="2" HorizontalAlignment="Left" CornerRadius="22" Name="thumb" Effect="{StaticResource EffectShadow2}" Background="White" Width="44" Height="44" RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
@@ -3479,7 +3470,7 @@
<Setter Property="Padding" Value="6,1" />
<Setter Property="hc:IconElement.Height" Value="12" />
</Style>
<Style BasedOn="{StaticResource ToggleButtonDefault}" TargetType="ToggleButton" />
<Style x:Key="{x:Type ToggleButton}" BasedOn="{StaticResource ToggleButtonDefault}" TargetType="ToggleButton" />
<Style x:Key="ToggleButtonPrimary" BasedOn="{StaticResource ToggleButtonBaseStyle}" TargetType="ToggleButton">
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}" />