From 9aa9639154dce852dd20efe0bf1c8f3961db2177 Mon Sep 17 00:00:00 2001 From: Jan Karger Date: Tue, 8 Mar 2016 22:07:19 +0100 Subject: [PATCH 01/10] respect _ThumbIndicator Margin Left and Right for transition --- MahApps.Metro/Controls/ToggleSwitchButton.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MahApps.Metro/Controls/ToggleSwitchButton.cs b/MahApps.Metro/Controls/ToggleSwitchButton.cs index 474564ccd7..5727d864f6 100644 --- a/MahApps.Metro/Controls/ToggleSwitchButton.cs +++ b/MahApps.Metro/Controls/ToggleSwitchButton.cs @@ -112,7 +112,7 @@ private void UpdateThumb() { if (_ThumbTranslate != null && _SwitchTrack != null && _ThumbIndicator != null) { - double destination = IsChecked.GetValueOrDefault() ? ActualWidth - (_SwitchTrack.Margin.Left + _SwitchTrack.Margin.Right + _ThumbIndicator.ActualWidth) : 0; + double destination = IsChecked.GetValueOrDefault() ? ActualWidth - (_SwitchTrack.Margin.Left + _SwitchTrack.Margin.Right + _ThumbIndicator.ActualWidth + _ThumbIndicator.Margin.Left + _ThumbIndicator.Margin.Right) : 0; _thumbAnimation = new DoubleAnimation(); _thumbAnimation.To = destination; @@ -172,7 +172,7 @@ void _DraggingThumb_DragStarted(object sender, DragStartedEventArgs e) if (_ThumbTranslate != null) { _ThumbTranslate.BeginAnimation(TranslateTransform.XProperty, null); - double destination = IsChecked.GetValueOrDefault() ? ActualWidth - (_SwitchTrack.Margin.Left + _SwitchTrack.Margin.Right + _ThumbIndicator.ActualWidth) : 0; + double destination = IsChecked.GetValueOrDefault() ? ActualWidth - (_SwitchTrack.Margin.Left + _SwitchTrack.Margin.Right + _ThumbIndicator.ActualWidth + _ThumbIndicator.Margin.Left + _ThumbIndicator.Margin.Right) : 0; _ThumbTranslate.X = destination; _thumbAnimation = null; } @@ -189,7 +189,7 @@ void _DraggingThumb_DragDelta(object sender, DragDeltaEventArgs e) if (_SwitchTrack != null && _ThumbIndicator != null) { double lastDragPosition = _lastDragPosition.Value; - _ThumbTranslate.X = Math.Min(ActualWidth - (_SwitchTrack.Margin.Left + _SwitchTrack.Margin.Right + _ThumbIndicator.ActualWidth), Math.Max(0, lastDragPosition + e.HorizontalChange)); + _ThumbTranslate.X = Math.Min(ActualWidth - (_SwitchTrack.Margin.Left + _SwitchTrack.Margin.Right + _ThumbIndicator.ActualWidth + _ThumbIndicator.Margin.Left + _ThumbIndicator.Margin.Right), Math.Max(0, lastDragPosition + e.HorizontalChange)); } } } @@ -219,7 +219,7 @@ void _SwitchTrack_SizeChanged(object sender, SizeChangedEventArgs e) { if (_ThumbTranslate != null && _SwitchTrack != null && _ThumbIndicator != null) { - double destination = IsChecked.GetValueOrDefault() ? ActualWidth - (_SwitchTrack.Margin.Left + _SwitchTrack.Margin.Right + _ThumbIndicator.ActualWidth) : 0; + double destination = IsChecked.GetValueOrDefault() ? ActualWidth - (_SwitchTrack.Margin.Left + _SwitchTrack.Margin.Right + _ThumbIndicator.ActualWidth + _ThumbIndicator.Margin.Left + _ThumbIndicator.Margin.Right) : 0; _ThumbTranslate.X = destination; } } From 5ee11188e49e90484b24c8c01d7cb266733b636e Mon Sep 17 00:00:00 2001 From: Jan Karger Date: Tue, 8 Mar 2016 23:49:43 +0100 Subject: [PATCH 02/10] new Controls.ToggleSwitch.xaml resource dictionary new MahApps.Metro.Styles.ToggleSwitchButton.Win10 and MahApps.Metro.Styles.ToggleSwitch.Win10 --- MahApps.Metro/MahApps.Metro.NET45.csproj | 5 + MahApps.Metro/MahApps.Metro.csproj | 5 + .../Styles/Controls.ToggleSwitch.xaml | 162 ++++++++++++++++++ MahApps.Metro/Styles/Controls.xaml | 9 +- 4 files changed, 174 insertions(+), 7 deletions(-) create mode 100644 MahApps.Metro/Styles/Controls.ToggleSwitch.xaml diff --git a/MahApps.Metro/MahApps.Metro.NET45.csproj b/MahApps.Metro/MahApps.Metro.NET45.csproj index cce2864a0d..25be126f05 100644 --- a/MahApps.Metro/MahApps.Metro.NET45.csproj +++ b/MahApps.Metro/MahApps.Metro.NET45.csproj @@ -500,6 +500,11 @@ MSBuild:Compile Controls.xaml + + Designer + MSBuild:Compile + Controls.xaml + MSBuild:Compile Designer diff --git a/MahApps.Metro/MahApps.Metro.csproj b/MahApps.Metro/MahApps.Metro.csproj index 03ad7556e6..4574c6f884 100644 --- a/MahApps.Metro/MahApps.Metro.csproj +++ b/MahApps.Metro/MahApps.Metro.csproj @@ -451,6 +451,11 @@ MSBuild:Compile Controls.xaml + + Designer + MSBuild:Compile + Controls.xaml + MSBuild:Compile Designer diff --git a/MahApps.Metro/Styles/Controls.ToggleSwitch.xaml b/MahApps.Metro/Styles/Controls.ToggleSwitch.xaml new file mode 100644 index 0000000000..7337683d68 --- /dev/null +++ b/MahApps.Metro/Styles/Controls.ToggleSwitch.xaml @@ -0,0 +1,162 @@ + + + + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Controls.xaml b/MahApps.Metro/Styles/Controls.xaml index 69204e58a6..ff77f4d7fd 100644 --- a/MahApps.Metro/Styles/Controls.xaml +++ b/MahApps.Metro/Styles/Controls.xaml @@ -32,6 +32,8 @@ + + - From 8baac58d37aefc7db5eab9cf14907b177cf04328 Mon Sep 17 00:00:00 2001 From: Jan Karger Date: Thu, 10 Mar 2016 00:44:48 +0100 Subject: [PATCH 04/10] more win10 like --- .../Styles/Controls.ToggleSwitch.xaml | 61 ++++++++----------- 1 file changed, 24 insertions(+), 37 deletions(-) diff --git a/MahApps.Metro/Styles/Controls.ToggleSwitch.xaml b/MahApps.Metro/Styles/Controls.ToggleSwitch.xaml index 9e0e049b93..c09527efed 100644 --- a/MahApps.Metro/Styles/Controls.ToggleSwitch.xaml +++ b/MahApps.Metro/Styles/Controls.ToggleSwitch.xaml @@ -19,12 +19,12 @@ TargetType="{x:Type Controls:ToggleSwitchButton}"> - - - + + + @@ -35,23 +35,23 @@ - @@ -60,31 +60,12 @@ - - - - - - - - - - - - - - - - - - - @@ -134,19 +115,20 @@ - - - - - + + + + + - - - + + + + @@ -160,7 +142,12 @@ - + \ No newline at end of file From 3215680554ef9464e82f146c9c1148cd4fefac7d Mon Sep 17 00:00:00 2001 From: Jan Karger Date: Thu, 10 Mar 2016 09:32:51 +0100 Subject: [PATCH 05/10] fix IsPressed state since we use a Thumb --- MahApps.Metro/Controls/ToggleSwitchButton.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/MahApps.Metro/Controls/ToggleSwitchButton.cs b/MahApps.Metro/Controls/ToggleSwitchButton.cs index c097740eab..99945203fd 100644 --- a/MahApps.Metro/Controls/ToggleSwitchButton.cs +++ b/MahApps.Metro/Controls/ToggleSwitchButton.cs @@ -1,7 +1,9 @@ using System; +using System.Reflection; using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; +using System.Windows.Input; using System.Windows.Shapes; using System.Windows.Media; using System.Windows.Media.Animation; @@ -166,10 +168,24 @@ public override void OnApplyTemplate() } } + private void SetIsPressed(bool pressed) + { + // we can't use readonly IsPressedProperty + typeof(ToggleButton).GetMethod("set_IsPressed", BindingFlags.Instance | BindingFlags.NonPublic) + .Invoke(this, new object[] { pressed }); + } + private double? _lastDragPosition; private bool _isDragging; void _DraggingThumb_DragStarted(object sender, DragStartedEventArgs e) { + if (Mouse.LeftButton == MouseButtonState.Pressed) + { + if (!IsPressed) + { + SetIsPressed(true); + } + } if (_ThumbTranslate != null) { _ThumbTranslate.BeginAnimation(TranslateTransform.XProperty, null); @@ -197,6 +213,7 @@ void _DraggingThumb_DragDelta(object sender, DragDeltaEventArgs e) void _DraggingThumb_DragCompleted(object sender, DragCompletedEventArgs e) { + SetIsPressed(false); _lastDragPosition = null; if (!_isDragging) { From ad7807725128345a6305215ae5e74bb5a8824bf5 Mon Sep 17 00:00:00 2001 From: Jan Karger Date: Thu, 10 Mar 2016 16:20:48 +0100 Subject: [PATCH 06/10] PART_ThumbIndicator should be a FrameworkElement --- MahApps.Metro/Controls/ToggleSwitchButton.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/MahApps.Metro/Controls/ToggleSwitchButton.cs b/MahApps.Metro/Controls/ToggleSwitchButton.cs index 99945203fd..1ed6192bb0 100644 --- a/MahApps.Metro/Controls/ToggleSwitchButton.cs +++ b/MahApps.Metro/Controls/ToggleSwitchButton.cs @@ -4,7 +4,6 @@ using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Input; -using System.Windows.Shapes; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Data; @@ -17,7 +16,7 @@ namespace MahApps.Metro.Controls [TemplatePart(Name = PART_BackgroundTranslate, Type = typeof(TranslateTransform))] [TemplatePart(Name = PART_DraggingThumb, Type = typeof(Thumb))] [TemplatePart(Name = PART_SwitchTrack, Type = typeof(Grid))] - [TemplatePart(Name = PART_ThumbIndicator, Type = typeof(Shape))] + [TemplatePart(Name = PART_ThumbIndicator, Type = typeof(FrameworkElement))] [TemplatePart(Name = PART_ThumbTranslate, Type = typeof(TranslateTransform))] public class ToggleSwitchButton : ToggleButton { @@ -30,7 +29,7 @@ public class ToggleSwitchButton : ToggleButton private TranslateTransform _BackgroundTranslate; private Thumb _DraggingThumb; private Grid _SwitchTrack; - private Shape _ThumbIndicator; + private FrameworkElement _ThumbIndicator; private TranslateTransform _ThumbTranslate; private readonly PropertyChangeNotifier isCheckedPropertyChangeNotifier; @@ -141,7 +140,7 @@ public override void OnApplyTemplate() _BackgroundTranslate = GetTemplateChild(PART_BackgroundTranslate) as TranslateTransform; _DraggingThumb = GetTemplateChild(PART_DraggingThumb) as Thumb; _SwitchTrack = GetTemplateChild(PART_SwitchTrack) as Grid; - _ThumbIndicator = GetTemplateChild(PART_ThumbIndicator) as Shape; + _ThumbIndicator = GetTemplateChild(PART_ThumbIndicator) as FrameworkElement; _ThumbTranslate = GetTemplateChild(PART_ThumbTranslate) as TranslateTransform; if (_ThumbIndicator != null && _ThumbTranslate != null && _BackgroundTranslate != null) From b7aaf0311d4ca561e869eac2e96f7a27876418cc Mon Sep 17 00:00:00 2001 From: Jan Karger Date: Thu, 10 Mar 2016 16:21:47 +0100 Subject: [PATCH 07/10] Win10 toggle switch style finished --- MahApps.Metro/Styles/Accents/Amber.xaml | 11 +- MahApps.Metro/Styles/Accents/BaseDark.xaml | 11 + MahApps.Metro/Styles/Accents/BaseLight.xaml | 11 + MahApps.Metro/Styles/Accents/Blue.xaml | 11 +- MahApps.Metro/Styles/Accents/Brown.xaml | 8 + MahApps.Metro/Styles/Accents/Cobalt.xaml | 7 + MahApps.Metro/Styles/Accents/Crimson.xaml | 7 + MahApps.Metro/Styles/Accents/Cyan.xaml | 7 + MahApps.Metro/Styles/Accents/Emerald.xaml | 7 + MahApps.Metro/Styles/Accents/Green.xaml | 7 + MahApps.Metro/Styles/Accents/Indigo.xaml | 7 + MahApps.Metro/Styles/Accents/Lime.xaml | 7 + MahApps.Metro/Styles/Accents/Magenta.xaml | 7 + MahApps.Metro/Styles/Accents/Mauve.xaml | 7 + MahApps.Metro/Styles/Accents/Olive.xaml | 7 + MahApps.Metro/Styles/Accents/Orange.xaml | 7 + MahApps.Metro/Styles/Accents/Pink.xaml | 7 + MahApps.Metro/Styles/Accents/Purple.xaml | 7 + MahApps.Metro/Styles/Accents/Red.xaml | 7 + MahApps.Metro/Styles/Accents/Sienna.xaml | 7 + MahApps.Metro/Styles/Accents/Steel.xaml | 7 + MahApps.Metro/Styles/Accents/Taupe.xaml | 7 + MahApps.Metro/Styles/Accents/Teal.xaml | 7 + MahApps.Metro/Styles/Accents/Violet.xaml | 7 + MahApps.Metro/Styles/Accents/Yellow.xaml | 7 + MahApps.Metro/Styles/Colors.xaml | 17 ++ .../Styles/Controls.ToggleSwitch.xaml | 193 +++++++++--------- MahApps.Metro/Themes/ToggleSwitch.xaml | 1 + .../ExampleViews/ButtonsExample.xaml | 16 +- 29 files changed, 319 insertions(+), 100 deletions(-) diff --git a/MahApps.Metro/Styles/Accents/Amber.xaml b/MahApps.Metro/Styles/Accents/Amber.xaml index 66f2522867..0c8f44dd47 100644 --- a/MahApps.Metro/Styles/Accents/Amber.xaml +++ b/MahApps.Metro/Styles/Accents/Amber.xaml @@ -3,8 +3,11 @@ xmlns:options="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="options"> + #FFB17807 - + + #FFF0A30A + #CCF0A30A #99F0A30A @@ -13,7 +16,9 @@ #33F0A30A + + @@ -41,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/BaseDark.xaml b/MahApps.Metro/Styles/Accents/BaseDark.xaml index 24f208f192..916e128489 100644 --- a/MahApps.Metro/Styles/Accents/BaseDark.xaml +++ b/MahApps.Metro/Styles/Accents/BaseDark.xaml @@ -85,4 +85,15 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/BaseLight.xaml b/MahApps.Metro/Styles/Accents/BaseLight.xaml index 933302e2e8..6c2455bc77 100644 --- a/MahApps.Metro/Styles/Accents/BaseLight.xaml +++ b/MahApps.Metro/Styles/Accents/BaseLight.xaml @@ -85,4 +85,15 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Blue.xaml b/MahApps.Metro/Styles/Accents/Blue.xaml index d1864ffdb0..2feaed5d34 100644 --- a/MahApps.Metro/Styles/Accents/Blue.xaml +++ b/MahApps.Metro/Styles/Accents/Blue.xaml @@ -3,9 +3,10 @@ xmlns:options="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="options"> - + #FF086F9E - + + #FF119EDA #CC119EDA @@ -15,7 +16,9 @@ #33119EDA + + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Brown.xaml b/MahApps.Metro/Styles/Accents/Brown.xaml index 89ca0b8b00..484d26a62b 100644 --- a/MahApps.Metro/Styles/Accents/Brown.xaml +++ b/MahApps.Metro/Styles/Accents/Brown.xaml @@ -6,6 +6,8 @@ #FF604220 + #FF825A2C + #CC825A2C #99825A2C @@ -14,7 +16,9 @@ #33825A2C + + @@ -42,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Cobalt.xaml b/MahApps.Metro/Styles/Accents/Cobalt.xaml index 11ff5ef763..0e18ed17c4 100644 --- a/MahApps.Metro/Styles/Accents/Cobalt.xaml +++ b/MahApps.Metro/Styles/Accents/Cobalt.xaml @@ -6,6 +6,8 @@ #FF003BB0 + #FF0050EF + #CC0050EF #990050EF @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Crimson.xaml b/MahApps.Metro/Styles/Accents/Crimson.xaml index 4be2c5b2a5..ab46266e19 100644 --- a/MahApps.Metro/Styles/Accents/Crimson.xaml +++ b/MahApps.Metro/Styles/Accents/Crimson.xaml @@ -6,6 +6,8 @@ #FF77001B + #FFA20025 + #CCA20025 #99A20025 @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Cyan.xaml b/MahApps.Metro/Styles/Accents/Cyan.xaml index 526f36e36f..18661f8140 100644 --- a/MahApps.Metro/Styles/Accents/Cyan.xaml +++ b/MahApps.Metro/Styles/Accents/Cyan.xaml @@ -6,6 +6,8 @@ #FF1377A7 + #FF1BA1E2 + #CC1BA1E2 #991BA1E2 @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Emerald.xaml b/MahApps.Metro/Styles/Accents/Emerald.xaml index 35f469d073..9bfbfee27b 100644 --- a/MahApps.Metro/Styles/Accents/Emerald.xaml +++ b/MahApps.Metro/Styles/Accents/Emerald.xaml @@ -6,6 +6,8 @@ #FF006600 + #FF008A00 + #CC008A00 #99008A00 @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Green.xaml b/MahApps.Metro/Styles/Accents/Green.xaml index 88aad87e21..27a58c2f0f 100644 --- a/MahApps.Metro/Styles/Accents/Green.xaml +++ b/MahApps.Metro/Styles/Accents/Green.xaml @@ -6,6 +6,8 @@ #FF477D11 + #FF60A917 + #CC60A917 #9960A917 @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Indigo.xaml b/MahApps.Metro/Styles/Accents/Indigo.xaml index c2bca3b5cb..7a6008007c 100644 --- a/MahApps.Metro/Styles/Accents/Indigo.xaml +++ b/MahApps.Metro/Styles/Accents/Indigo.xaml @@ -6,6 +6,8 @@ #FF4E00BC + #FF6A00FF + #CC6A00FF #996A00FF @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Lime.xaml b/MahApps.Metro/Styles/Accents/Lime.xaml index ee6b7c9329..16dbe6b198 100644 --- a/MahApps.Metro/Styles/Accents/Lime.xaml +++ b/MahApps.Metro/Styles/Accents/Lime.xaml @@ -6,6 +6,8 @@ #FF799100 + #FFA4C400 + #CCA4C400 #99A4C400 @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Magenta.xaml b/MahApps.Metro/Styles/Accents/Magenta.xaml index c744161dd9..5a48b4e9f4 100644 --- a/MahApps.Metro/Styles/Accents/Magenta.xaml +++ b/MahApps.Metro/Styles/Accents/Magenta.xaml @@ -6,6 +6,8 @@ #FF9F0055 + #FFD80073 + #CCD80073 #99D80073 @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Mauve.xaml b/MahApps.Metro/Styles/Accents/Mauve.xaml index 7f13c36259..b0e55b0a5b 100644 --- a/MahApps.Metro/Styles/Accents/Mauve.xaml +++ b/MahApps.Metro/Styles/Accents/Mauve.xaml @@ -6,6 +6,8 @@ #FF574766 + #FF76608A + #CC76608A #9976608A @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Olive.xaml b/MahApps.Metro/Styles/Accents/Olive.xaml index d3fb6b22bd..7a0bd85fd2 100644 --- a/MahApps.Metro/Styles/Accents/Olive.xaml +++ b/MahApps.Metro/Styles/Accents/Olive.xaml @@ -6,6 +6,8 @@ #FF50634A + #FF6D8764 + #CC6D8764 #996D8764 @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Orange.xaml b/MahApps.Metro/Styles/Accents/Orange.xaml index 62994ddcb1..c76d0b33bf 100644 --- a/MahApps.Metro/Styles/Accents/Orange.xaml +++ b/MahApps.Metro/Styles/Accents/Orange.xaml @@ -6,6 +6,8 @@ #FFB94C00 + #FFFA6800 + #CCFA6800 #99FA6800 @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Pink.xaml b/MahApps.Metro/Styles/Accents/Pink.xaml index c9dd0182b4..ea70d4f4a5 100644 --- a/MahApps.Metro/Styles/Accents/Pink.xaml +++ b/MahApps.Metro/Styles/Accents/Pink.xaml @@ -6,6 +6,8 @@ #FFB45499 + #FFF472D0 + #CCF472D0 #99F472D0 @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Purple.xaml b/MahApps.Metro/Styles/Accents/Purple.xaml index 1a0e699649..5f99c8cfee 100644 --- a/MahApps.Metro/Styles/Accents/Purple.xaml +++ b/MahApps.Metro/Styles/Accents/Purple.xaml @@ -6,6 +6,8 @@ #FF5133AB + #FF6459DF + #CC6459DF #996459DF @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Red.xaml b/MahApps.Metro/Styles/Accents/Red.xaml index a83a28d32d..7a2720fa09 100644 --- a/MahApps.Metro/Styles/Accents/Red.xaml +++ b/MahApps.Metro/Styles/Accents/Red.xaml @@ -6,6 +6,8 @@ #FFA90E00 + #FFE51400 + #CCE51400 #99E51400 @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Sienna.xaml b/MahApps.Metro/Styles/Accents/Sienna.xaml index c391a3bcef..cd296a6f23 100644 --- a/MahApps.Metro/Styles/Accents/Sienna.xaml +++ b/MahApps.Metro/Styles/Accents/Sienna.xaml @@ -6,6 +6,8 @@ #FF763C21 + #FFA0522D + #CCA0522D #99A0522D @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Steel.xaml b/MahApps.Metro/Styles/Accents/Steel.xaml index 588bdc60cf..19dfcdd59f 100644 --- a/MahApps.Metro/Styles/Accents/Steel.xaml +++ b/MahApps.Metro/Styles/Accents/Steel.xaml @@ -6,6 +6,8 @@ #FF4A5763 + #FF647687 + #CC647687 #99647687 @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Taupe.xaml b/MahApps.Metro/Styles/Accents/Taupe.xaml index 2673a4c033..4c783a4cfd 100644 --- a/MahApps.Metro/Styles/Accents/Taupe.xaml +++ b/MahApps.Metro/Styles/Accents/Taupe.xaml @@ -6,6 +6,8 @@ #FF635939 + #FF87794E + #CC87794E #9987794E @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Teal.xaml b/MahApps.Metro/Styles/Accents/Teal.xaml index bdaae9dbe6..b9eb44b25b 100644 --- a/MahApps.Metro/Styles/Accents/Teal.xaml +++ b/MahApps.Metro/Styles/Accents/Teal.xaml @@ -6,6 +6,8 @@ #FF007E7D + #FF00ABA9 + #CC00ABA9 #9900ABA9 @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Violet.xaml b/MahApps.Metro/Styles/Accents/Violet.xaml index cb5e2569ee..93e8536690 100644 --- a/MahApps.Metro/Styles/Accents/Violet.xaml +++ b/MahApps.Metro/Styles/Accents/Violet.xaml @@ -6,6 +6,8 @@ #FF7D00BC + #FFAA00FF + #CCAA00FF #99AA00FF @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Accents/Yellow.xaml b/MahApps.Metro/Styles/Accents/Yellow.xaml index fa6da112fe..eccbca902e 100644 --- a/MahApps.Metro/Styles/Accents/Yellow.xaml +++ b/MahApps.Metro/Styles/Accents/Yellow.xaml @@ -6,6 +6,8 @@ #FFBBA404 + #FFFEDE06 + #CCFEDE06 #99FEDE06 @@ -16,6 +18,7 @@ + @@ -43,4 +46,8 @@ + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Colors.xaml b/MahApps.Metro/Styles/Colors.xaml index 913d654e3e..e0c051536d 100644 --- a/MahApps.Metro/Styles/Colors.xaml +++ b/MahApps.Metro/Styles/Colors.xaml @@ -10,6 +10,7 @@ #FF086F9E + #FF119EDA #CC119EDA @@ -61,6 +62,7 @@ + @@ -176,4 +178,19 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MahApps.Metro/Styles/Controls.ToggleSwitch.xaml b/MahApps.Metro/Styles/Controls.ToggleSwitch.xaml index c09527efed..da79043035 100644 --- a/MahApps.Metro/Styles/Controls.ToggleSwitch.xaml +++ b/MahApps.Metro/Styles/Controls.ToggleSwitch.xaml @@ -1,7 +1,8 @@  - + xmlns:Controls="clr-namespace:MahApps.Metro.Controls" + xmlns:converters="clr-namespace:MahApps.Metro.Converters"> + - + \ No newline at end of file diff --git a/MahApps.Metro/Themes/ToggleSwitch.xaml b/MahApps.Metro/Themes/ToggleSwitch.xaml index 5936c20fbe..335816c9b6 100644 --- a/MahApps.Metro/Themes/ToggleSwitch.xaml +++ b/MahApps.Metro/Themes/ToggleSwitch.xaml @@ -11,6 +11,7 @@ + diff --git a/samples/MetroDemo/ExampleViews/ButtonsExample.xaml b/samples/MetroDemo/ExampleViews/ButtonsExample.xaml index f903b72a83..2dbd412da2 100644 --- a/samples/MetroDemo/ExampleViews/ButtonsExample.xaml +++ b/samples/MetroDemo/ExampleViews/ButtonsExample.xaml @@ -192,16 +192,30 @@