Skip to content

Commit

Permalink
(GH-3753) Use ToggleSwitchContentSpaceMargin for space between switch…
Browse files Browse the repository at this point in the history
… and content
  • Loading branch information
punker76 committed Feb 29, 2020
1 parent d0d9f96 commit a7bc047
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,15 @@

<Controls:ToggleSwitch Margin="{StaticResource ControlMargin}" Header="Header" />
<Controls:ToggleSwitch Margin="{StaticResource ControlMargin}" IsEnabled="False" />
<Controls:ToggleSwitch Margin="{StaticResource ControlMargin}" OnContent="Enabled" OffContent="Disabled" IsOn="True" />
<Controls:ToggleSwitch Margin="{StaticResource ControlMargin}" OnContent="Enabled" OffContent="Disabled" IsOn="True" IsEnabled="False" />
<Controls:ToggleSwitch Margin="{StaticResource ControlMargin}"
IsOn="True"
OffContent="Disabled"
OnContent="Enabled" />
<Controls:ToggleSwitch Margin="{StaticResource ControlMargin}"
IsEnabled="False"
IsOn="True"
OffContent="Disabled"
OnContent="Enabled" />
</StackPanel>

<StackPanel Grid.Row="1"
Expand Down
1 change: 1 addition & 0 deletions src/MahApps.Metro/Styles/Controls.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Themes/HamburgerMenu.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Themes/RangeSlider.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Themes/MetroProgressBar.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Themes/ToggleSwitch.xaml" />
</ResourceDictionary.MergedDictionaries>

<Style x:Key="MahApps.Styles.ContentControl.FloatingMessageContainer" TargetType="{x:Type ContentControl}">
Expand Down
2 changes: 1 addition & 1 deletion src/MahApps.Metro/Styles/Themes/Theme.Template.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
<markup:StaticResource x:Key="MahApps.Brushes.RadioButton.CheckGlyphStrokePressed" ResourceKey="MahApps.Brushes.SystemControlTransparent" />
<markup:StaticResource x:Key="MahApps.Brushes.RadioButton.CheckGlyphStrokeDisabled" ResourceKey="MahApps.Brushes.SystemControlTransparent" />

<!-- Resources for MahApps.Styles.ToggleSwitchButton.Win10 and MahApps.Styles.ToggleSwitch.Win10 -->
<!-- Resources for MahApps.Styles.ToggleSwitch -->
<markup:StaticResource x:Key="MahApps.Brushes.ToggleSwitch.ContentForeground" ResourceKey="MahApps.Brushes.SystemControlForegroundBaseHigh" />
<markup:StaticResource x:Key="MahApps.Brushes.ToggleSwitch.ContentForegroundDisabled" ResourceKey="MahApps.Brushes.SystemControlDisabledBaseMediumLow" />
<markup:StaticResource x:Key="MahApps.Brushes.ToggleSwitch.HeaderForeground" ResourceKey="MahApps.Brushes.SystemControlForegroundBaseHigh" />
Expand Down
Loading

0 comments on commit a7bc047

Please sign in to comment.