Permalink
Browse files

Merge pull request #406 from stefan-schweiger/patch-1

ToggleSwitchButton: Removed accent border when unchecked
  • Loading branch information...
2 parents 8b8e752 + 62cc77c commit 072d6965e9c1c20fb2aeb5f5de1b9cbc20287a0c @shiftbot shiftbot committed Apr 4, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 MahApps.Metro/Themes/ToggleSwitch.xaml
@@ -78,6 +78,7 @@
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="border">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
</ObjectAnimationUsingKeyFrames>
+ <ThicknessAnimation Duration="0" To="1" Storyboard.TargetProperty="(Border.Margin)" Storyboard.TargetName="checked"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
@@ -96,11 +97,11 @@
</Rectangle>
<Border BorderThickness="2" BorderBrush="{DynamicResource GrayBrush9}">
<Grid Margin="2">
- <Border BorderThickness="0" Background="{DynamicResource AccentColorBrush}" Margin="0" />
+ <Border x:Name="checked" BorderThickness="0" Background="{DynamicResource AccentColorBrush}" Margin="0" />
<Border x:Name="border" BorderThickness="0" Background="{DynamicResource GrayBrush9}" Visibility="Collapsed" Margin="0" />
<Border x:Name="pressed" BorderThickness="0" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" Opacity="0.25" Visibility="Collapsed" Margin="0" />
<Border x:Name="hover" BorderThickness="0" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" Opacity="0.15" Visibility="Collapsed" Margin="0" />
- <Border x:Name="disabled" BorderThickness="0" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" Opacity="0.25" Visibility="Collapsed" Margin="0" />
+ <Border x:Name="disabled" BorderThickness="0" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" Opacity="0.5" Visibility="Collapsed" Margin="0" />
</Grid>
</Border>
</Grid>
@@ -121,7 +122,7 @@
</Border.RenderTransform>
<Grid>
<Border x:Name="ThumbCenter" BorderBrush="{TemplateBinding Foreground}" BorderThickness="0" Background="{DynamicResource BlackBrush}" />
- <Border x:Name="disabledTumb" BorderBrush="{TemplateBinding Foreground}" BorderThickness="0" Background="{DynamicResource WhiteBrush}" Opacity="0.25" Visibility="Collapsed" />
+ <Border x:Name="disabledTumb" BorderBrush="{TemplateBinding Foreground}" BorderThickness="0" Background="{DynamicResource WhiteBrush}" Opacity="0.5" Visibility="Collapsed" />
</Grid>
</Border>
</Grid>

0 comments on commit 072d696

Please sign in to comment.