Skip to content

Commit 0932954

Browse files
authored
fix(controls): ToggleSwitch ignoring Padding (#1521)
1 parent 2ea97a7 commit 0932954

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Wpf.Ui/Controls/ToggleSwitch/ToggleSwitch.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<system:Double x:Key="RadioButtonBorderThemeThickness">1</system:Double>
2020
<system:Double x:Key="ToggleButtonWidth">40</system:Double>
2121
<system:Double x:Key="ToggleButtonHeight">20</system:Double>
22-
<Thickness x:Key="ToggleSwitchPadding">8,6,0,0</Thickness>
22+
<Thickness x:Key="ToggleSwitchPadding">0,0,0,0</Thickness>
2323
<Thickness x:Key="ToggleSwitchBorderThemeThickness">1</Thickness>
2424
<Thickness x:Key="ToggleSwitchContentMargin">8,0,0,0</Thickness>
2525

@@ -43,7 +43,7 @@
4343
<Setter Property="Template">
4444
<Setter.Value>
4545
<ControlTemplate TargetType="{x:Type controls:ToggleSwitch}">
46-
<Grid Background="Transparent">
46+
<Grid Margin="{TemplateBinding Padding}" Background="Transparent">
4747
<Grid.ColumnDefinitions>
4848
<ColumnDefinition Width="Auto" />
4949
<ColumnDefinition Width="*" />

0 commit comments

Comments
 (0)