feat: use toggleswitch in demo.

This commit is contained in:
rabbitism
2023-02-24 00:42:08 +08:00
committed by Dong Bin
parent 5b352b6f81
commit e675699f9c
3 changed files with 24 additions and 35 deletions

View File

@@ -166,15 +166,18 @@
x:Key="ButtonToggleSwitch"
BasedOn="{StaticResource {x:Type ToggleSwitch}}"
TargetType="ToggleSwitch">
<Setter Property="Padding" Value="8" />
<Setter Property="CornerRadius" Value="3" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template">
<ControlTemplate TargetType="ToggleSwitch">
<Border
Name="Background"
Padding="8"
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
CornerRadius="3"
CornerRadius="{TemplateBinding CornerRadius}"
Cursor="Hand">
<Grid Background="Transparent" ColumnDefinitions="Auto">
<Grid ColumnDefinitions="Auto">
<Grid x:Name="PART_SwitchKnob" />
<Grid x:Name="PART_MovingKnobs" />
<ContentPresenter