From f230303333302addca731be660ada216890a51b6 Mon Sep 17 00:00:00 2001 From: Alexandre Zollinger Chohfi Date: Thu, 5 Apr 2018 14:54:36 -0700 Subject: [PATCH 01/34] Fix crash (#1913). --- .../ConnectedAnimations/ConnectedAnimationHelper.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/ConnectedAnimationHelper.cs b/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/ConnectedAnimationHelper.cs index 2670117739c..0d148ed7e68 100644 --- a/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/ConnectedAnimationHelper.cs +++ b/Microsoft.Toolkit.Uwp.UI.Animations/ConnectedAnimations/ConnectedAnimationHelper.cs @@ -66,7 +66,14 @@ private void Frame_Navigating(object sender, Windows.UI.Xaml.Navigation.Navigati if (listAnimProperty.ListViewBase.ItemsSource is IEnumerable items && items.Contains(e.Parameter)) { - listAnimProperty.ListViewBase.PrepareConnectedAnimation(props.Key, e.Parameter, listAnimProperty.ElementName); + try + { + listAnimProperty.ListViewBase.PrepareConnectedAnimation(props.Key, e.Parameter, listAnimProperty.ElementName); + } + catch + { + // Ignore + } } } } From d360443cffb9a2fe04bb276e3492be52898ecf25 Mon Sep 17 00:00:00 2001 From: "REDMOND\\shweaver" Date: Tue, 10 Apr 2018 12:12:48 -0700 Subject: [PATCH 02/34] Fluentized BladeView control and fixed collapsed/expanded functionality --- .../BladeView/BladeItem.cs | 2 ++ .../BladeView/BladeView.xaml | 36 +++++++++++++------ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/BladeView/BladeItem.cs b/Microsoft.Toolkit.Uwp.UI.Controls/BladeView/BladeItem.cs index 6e15e1d9f2e..f36b1b5ba6a 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/BladeView/BladeItem.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls/BladeView/BladeItem.cs @@ -73,6 +73,7 @@ protected override void OnExpanded(EventArgs args) if (_loaded) { Width = _normalModeWidth; + VisualStateManager.GoToState(this, "Expanded", true); } } @@ -83,6 +84,7 @@ protected override void OnCollapsed(EventArgs args) if (_loaded) { Width = double.NaN; + VisualStateManager.GoToState(this, "Collapsed", true); } } diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/BladeView/BladeView.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/BladeView/BladeView.xaml index 973f59d735b..4386aa30e1d 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/BladeView/BladeView.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls/BladeView/BladeView.xaml @@ -85,11 +85,11 @@ + + + + + - - - - + + - - - + + + - - - - - - + + + This text to simulate the resizing feature of the Grid Splitter Control, try to move the splitter to see the effect RowDefinition MinHeight="100" + + + + + This text to simulate the resizing feature of the Grid Splitter Control, try to move the splitter to see the effect + + + + + This text to simulate the resizing feature of the Grid Splitter Control, try to move the splitter to see the effect + + - - This text to simulate the resizing feature of the Grid Splitter Control, try to move the splitter to see the effect RowDefinition MinHeight="100" - - - This text to simulate the resizing feature of the Grid Splitter Control, try to move the splitter to see the effect - - - This text to simulate the resizing feature of the Grid Splitter Control, try to move the splitter to see the effect - - - - This text to simulate the resizing feature of the Grid Splitter Control, try to move the splitter to see the effect - - - This text to simulate the resizing feature of the Grid Splitter Control, try to move the splitter to see the effect - - - This text to simulate the resizing feature of the Grid Splitter Control, try to move the splitter to see the effect - + + + This text to simulate the resizing feature of the Grid Splitter Control, try to move the splitter to see the effect + + + + + This text to simulate the resizing feature of the Grid Splitter Control, try to move the splitter to see the effect + + + + + This text to simulate the resizing feature of the Grid Splitter Control, try to move the splitter to see the effect + + + Width="16"> + + + + + Grid.ColumnSpan="3" + VerticalAlignment="Top" + Height="16"> + + + + diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.cs b/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.cs index bd847824b14..75cfbaee0f3 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.cs @@ -33,6 +33,10 @@ public partial class GridSplitter : Control private GripperHoverWrapper _hoverWrapper; private TextBlock _gripperDisplay; + private bool _pressed = false; + private bool _dragging = false; + private bool _pointerEntered = false; + /// /// Gets the target parent grid from level /// @@ -175,13 +179,70 @@ protected override void OnApplyTemplate() // Unhook registered events Loaded -= GridSplitter_Loaded; + PointerEntered -= GridSplitter_PointerEntered; + PointerExited -= GridSplitter_PointerExited; + PointerPressed -= GridSplitter_PointerPressed; + PointerReleased -= GridSplitter_PointerReleased; + ManipulationStarted -= GridSplitter_ManipulationStarted; + ManipulationCompleted -= GridSplitter_ManipulationCompleted; // Register Events Loaded += GridSplitter_Loaded; + PointerEntered += GridSplitter_PointerEntered; + PointerExited += GridSplitter_PointerExited; + PointerPressed += GridSplitter_PointerPressed; + PointerReleased += GridSplitter_PointerReleased; + ManipulationStarted += GridSplitter_ManipulationStarted; + ManipulationCompleted += GridSplitter_ManipulationCompleted; _hoverWrapper?.UnhookEvents(); ManipulationMode = ManipulationModes.TranslateX | ManipulationModes.TranslateY; } + + private void GridSplitter_PointerReleased(object sender, PointerRoutedEventArgs e) + { + _pressed = false; + VisualStateManager.GoToState(this, _pointerEntered ? "PointerOver" : "Normal", true); + } + + private void GridSplitter_PointerPressed(object sender, PointerRoutedEventArgs e) + { + _pressed = true; + VisualStateManager.GoToState(this, "Pressed", true); + } + + private void GridSplitter_PointerExited(object sender, PointerRoutedEventArgs e) + { + _pointerEntered = false; + + if (!_pressed && !_dragging) + { + VisualStateManager.GoToState(this, "Normal", true); + } + } + + private void GridSplitter_PointerEntered(object sender, PointerRoutedEventArgs e) + { + _pointerEntered = true; + + if (!_pressed && !_dragging) + { + VisualStateManager.GoToState(this, "PointerOver", true); + } + } + + private void GridSplitter_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e) + { + _dragging = false; + _pressed = false; + VisualStateManager.GoToState(this, _pointerEntered ? "PointerOver" : "Normal", true); + } + + private void GridSplitter_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e) + { + _dragging = true; + VisualStateManager.GoToState(this, "Pressed", true); + } } } diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.xaml index 009a8cbb193..7919cbe9dbb 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.xaml @@ -5,11 +5,38 @@ @@ -21,7 +21,11 @@ + Margin="48" + BorderThickness="0,0,1,1" + BorderBrush="{StaticResource Brush-Grey-04}" + Height="500" + VerticalAlignment="Top"> From 3e7693b5391e09b5b66155379b5c88e028538cdb Mon Sep 17 00:00:00 2001 From: "REDMOND\\shweaver" Date: Wed, 11 Apr 2018 16:34:48 -0700 Subject: [PATCH 07/34] Fluentize InAppNotifications control --- .../InAppNotificationPage.xaml | 127 +++++--- .../InAppNotificationPage.xaml.cs | 68 ++-- .../InAppNotificationXaml.bind | 294 +++++++++++++----- .../InAppNotification/InAppNotification.xaml | 21 +- .../Styles/MSEdgeNotificationStyle.xaml | 19 +- 5 files changed, 365 insertions(+), 164 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationPage.xaml b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationPage.xaml index 6ced1a4a670..3d25b79b279 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationPage.xaml +++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationPage.xaml @@ -15,14 +15,14 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -182,7 +312,7 @@ - + HorizontalContentAlignment="Stretch" + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" + VerticalContentAlignment="Center" + TextWrapping="WrapWholeWords" /> - - - - - - - - + diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationPage.xaml.cs index 475e7c7f624..0b5410b4980 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationPage.xaml.cs +++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationPage.xaml.cs @@ -87,7 +87,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e) var grid = new Grid() { - Margin = new Thickness(0, 0, -18, 0) + Margin = new Thickness(0, 0, -38, 0) }; grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) }); @@ -140,7 +140,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e) Shell.Current.RegisterNewCommand("Show notification with buttons (with DataTemplate)", (sender, args) => { _exampleVSCodeInAppNotification?.Dismiss(); - SetCustomControlTemplate(); // Use the custom template without the Dismiss button. The DataTemplate will handle readd it. + SetCustomControlTemplate(); // Use the custom template without the Dismiss button. The DataTemplate will handle readding it. object inAppNotificationWithButtonsTemplate = null; bool? isTemplatePresent = _resources?.TryGetValue("InAppNotificationWithButtonsTemplate", out inAppNotificationWithButtonsTemplate); diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationXaml.bind b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationXaml.bind index b00c07b781b..b769482bcb4 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationXaml.bind +++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationXaml.bind @@ -5,6 +5,8 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages" xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" + xmlns:interactivity="using:Microsoft.Xaml.Interactivity" + xmlns:core="using:Microsoft.Xaml.Interactions.Core" mc:Ignorable="d"> @@ -13,9 +15,9 @@ - + - + + + + + + + + + + + + + diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/Menu/Menu.cs b/Microsoft.Toolkit.Uwp.UI.Controls/Menu/Menu.cs index ca24f493dcc..8da04a5cf97 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/Menu/Menu.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls/Menu/Menu.cs @@ -123,17 +123,6 @@ protected override void OnApplyTemplate() Loaded += Menu_Loaded; Unloaded += Menu_Unloaded; - if (ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.AcrylicBrush")) - { - Background = new Windows.UI.Xaml.Media.AcrylicBrush() - { - BackgroundSource = Windows.UI.Xaml.Media.AcrylicBackgroundSource.Backdrop, - TintColor = (Windows.UI.Color)Resources["SystemChromeWhiteColor"], - TintOpacity = 0.8, - FallbackColor = (Windows.UI.Color)Resources["SystemChromeMediumLowColor"] - }; - } - base.OnApplyTemplate(); } diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/Menu/Menu.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/Menu/Menu.xaml index 09913811da5..b740a8b8b2b 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/Menu/Menu.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls/Menu/Menu.xaml @@ -1,16 +1,11 @@  + xmlns:local="using:Microsoft.Toolkit.Uwp.UI.Controls" + xmlns:contract5Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,5)" + xmlns:contract5NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,5)"> - - - + + + + + + + + + + + + diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/BladeView/BladeView.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/BladeView/BladeView.xaml index 6d523266ff6..2f6d37f330a 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/BladeView/BladeView.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls/BladeView/BladeView.xaml @@ -88,7 +88,8 @@ - + + @@ -98,7 +99,7 @@ - + From af51ee8c002325d42b225950fb74de4a8d7b3404 Mon Sep 17 00:00:00 2001 From: "REDMOND\\shweaver" Date: Tue, 22 May 2018 10:55:27 -0700 Subject: [PATCH 28/34] Expander Dark Theme updates --- .../SamplePages/Expander/ExpanderXaml.bind | 4 +--- Microsoft.Toolkit.Uwp.UI.Controls/Expander/Expander.xaml | 6 ++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Expander/ExpanderXaml.bind b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Expander/ExpanderXaml.bind index 1c1570f3403..6043bb39ed4 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Expander/ExpanderXaml.bind +++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/Expander/ExpanderXaml.bind @@ -7,7 +7,6 @@ mc:Ignorable="d"> - @@ -27,8 +26,7 @@ - + diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/Expander/Expander.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/Expander/Expander.xaml index 3fa82140f7c..fa352293560 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/Expander/Expander.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls/Expander/Expander.xaml @@ -6,6 +6,8 @@ xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" mc:Ignorable="d"> + + - + diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/MSEdgeNotificationStyle.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/MSEdgeNotificationStyle.xaml index 00262a4fdee..0155c5d25bc 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/MSEdgeNotificationStyle.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/MSEdgeNotificationStyle.xaml @@ -164,17 +164,22 @@ From 6986707062e5c6fe6d06232d605db92165159ec4 Mon Sep 17 00:00:00 2001 From: "REDMOND\\shweaver" Date: Tue, 22 May 2018 16:10:53 -0700 Subject: [PATCH 31/34] RangeSelector Dark Theme updates. Added Background to tooltip --- .../RangeSelector/RangeSelector.cs | 66 ++++++++++--------- .../RangeSelector/RangeSelector.xaml | 11 +++- 2 files changed, 43 insertions(+), 34 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector/RangeSelector.cs b/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector/RangeSelector.cs index 8e4c90b06ba..0c55b782290 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector/RangeSelector.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector/RangeSelector.cs @@ -36,6 +36,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls [TemplatePart(Name = "ControlGrid", Type = typeof(Grid))] [TemplatePart(Name = "MinValueText", Type = typeof(TextBlock))] [TemplatePart(Name = "MaxValueText", Type = typeof(TextBlock))] + [TemplatePart(Name = "ToolTip", Type = typeof(Grid))] [TemplatePart(Name = "ToolTipText", Type = typeof(TextBlock))] public partial class RangeSelector : Control @@ -90,6 +91,7 @@ public partial class RangeSelector : Control private double _absolutePosition; private TextBlock _minValueText; private TextBlock _maxValueText; + private Grid _toolTip; private TextBlock _toolTipText; /// @@ -160,6 +162,7 @@ protected override void OnApplyTemplate() _controlGrid = GetTemplateChild("ControlGrid") as Grid; _minValueText = GetTemplateChild("MinValueText") as TextBlock; _maxValueText = GetTemplateChild("MaxValueText") as TextBlock; + _toolTip = GetTemplateChild("ToolTip") as Grid; _toolTipText = GetTemplateChild("ToolTipText") as TextBlock; if (_minThumb != null) @@ -319,11 +322,13 @@ private void ContainerCanvas_PointerPressed(object sender, PointerRoutedEventArg { RangeMax = normalizedPosition; _pointerManipulatingMax = true; + Thumb_DragStarted(_maxThumb); } else { RangeMin = normalizedPosition; _pointerManipulatingMin = true; + Thumb_DragStarted(_minThumb); } SyncThumbs(); @@ -792,55 +797,52 @@ private double DragThumb(Thumb thumb, double min, double max, double nextPos) Canvas.SetLeft(thumb, nextPos); - if (_toolTipText != null) + if (_toolTipText != null && _toolTip != null) { var thumbCenter = nextPos + (thumb.Width / 2); - _toolTipText.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); - var ttWidth = _toolTipText.ActualWidth / 2; + _toolTip.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); + var ttWidth = _toolTip.ActualWidth / 2; - Canvas.SetLeft(_toolTipText, thumbCenter - ttWidth); + Canvas.SetLeft(_toolTip, thumbCenter - ttWidth); } return Minimum + ((nextPos / DragWidth()) * (Maximum - Minimum)); } - private void MinThumb_DragStarted(object sender, DragStartedEventArgs e) + private void Thumb_DragStarted(Thumb thumb) { - ThumbDragStarted?.Invoke(this, e); - _absolutePosition = Canvas.GetLeft(_minThumb); - Canvas.SetZIndex(_minThumb, 10); - Canvas.SetZIndex(_maxThumb, 0); + var useMin = thumb == _minThumb; + var otherThumb = (useMin) ? _maxThumb : _minThumb; + + _absolutePosition = Canvas.GetLeft(thumb); + Canvas.SetZIndex(thumb, 10); + Canvas.SetZIndex(otherThumb, 0); _oldValue = RangeMin; - if (_toolTipText != null) + if (_toolTipText != null && _toolTip != null) { - _toolTipText.Visibility = Visibility.Visible; - var thumbCenter = _absolutePosition + (_minThumb.Width / 2); - _toolTipText.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); - var ttWidth = _toolTipText.ActualWidth / 2; - Canvas.SetLeft(_toolTipText, thumbCenter - ttWidth); + _toolTip.Visibility = Visibility.Visible; + var thumbCenter = _absolutePosition + (thumb.Width / 2); + _toolTip.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); + var ttWidth = _toolTip.ActualWidth / 2; + Canvas.SetLeft(_toolTip, thumbCenter - ttWidth); + + UpdateToolTipText(this, _toolTipText, (useMin) ? Minimum : Maximum); } - VisualStateManager.GoToState(this, "MinPressed", true); + VisualStateManager.GoToState(this, (useMin) ? "MinPressed" : "MaxPressed", true); } - private void MaxThumb_DragStarted(object sender, DragStartedEventArgs e) + private void MinThumb_DragStarted(object sender, DragStartedEventArgs e) { ThumbDragStarted?.Invoke(this, e); - _absolutePosition = Canvas.GetLeft(_maxThumb); - Canvas.SetZIndex(_minThumb, 0); - Canvas.SetZIndex(_maxThumb, 10); - _oldValue = RangeMax; - - if (_toolTipText != null) { - var thumbCenter = _absolutePosition + (_maxThumb.Width / 2); - _toolTipText.Visibility = Visibility.Visible; - _toolTipText.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity)); - var ttWidth = _toolTipText.ActualWidth / 2; - Canvas.SetLeft(_toolTipText, thumbCenter - ttWidth); - } + Thumb_DragStarted(_minThumb); + } - VisualStateManager.GoToState(this, "MaxPressed", true); + private void MaxThumb_DragStarted(object sender, DragStartedEventArgs e) + { + ThumbDragStarted?.Invoke(this, e); + Thumb_DragStarted(_maxThumb); } private void Thumb_DragCompleted(object sender, DragCompletedEventArgs e) @@ -849,9 +851,9 @@ private void Thumb_DragCompleted(object sender, DragCompletedEventArgs e) ValueChanged?.Invoke(this, sender.Equals(_minThumb) ? new RangeChangedEventArgs(_oldValue, RangeMin, RangeSelectorProperty.MinimumValue) : new RangeChangedEventArgs(_oldValue, RangeMax, RangeSelectorProperty.MaximumValue)); SyncThumbs(); - if (_toolTipText != null) + if (_toolTip != null) { - _toolTipText.Visibility = Visibility.Collapsed; + _toolTip.Visibility = Visibility.Collapsed; } VisualStateManager.GoToState(this, "Normal", true); diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector/RangeSelector.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector/RangeSelector.xaml index 0f9d68fb018..917108fef03 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector/RangeSelector.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector/RangeSelector.xaml @@ -64,7 +64,14 @@ Height="2" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" /> - + + + + + + Value="{ThemeResource SystemControlForegroundBaseMediumBrush}" /> From 75b446679e579f56bbb3e0107d9f1c8bd0ee5a34 Mon Sep 17 00:00:00 2001 From: "REDMOND\\shweaver" Date: Wed, 23 May 2018 11:22:01 -0700 Subject: [PATCH 32/34] RangeSelector color fixes --- .../RangeSelector/RangeSelector.xaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector/RangeSelector.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector/RangeSelector.xaml index 917108fef03..d1c45788c85 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector/RangeSelector.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls/RangeSelector/RangeSelector.xaml @@ -37,27 +37,26 @@ - - + Grid.Column="1"> - + - From ce774ef27bea75b6072a8d531007cf5fa068feff Mon Sep 17 00:00:00 2001 From: "REDMOND\\shweaver" Date: Wed, 23 May 2018 16:05:43 -0700 Subject: [PATCH 33/34] Color updates for RadialGauge control --- .../RadialGauge/RadialGaugeCode.bind | 10 +++++--- .../RadialGauge/RadialGauge.cs | 10 ++++---- .../RadialGauge/RadialGauge.xaml | 23 +++++++------------ 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/RadialGauge/RadialGaugeCode.bind b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/RadialGauge/RadialGaugeCode.bind index bf2be126cd8..0f73170a373 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/RadialGauge/RadialGaugeCode.bind +++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/RadialGauge/RadialGaugeCode.bind @@ -20,14 +20,18 @@ Minimum="0" Maximum="240" StepSize="30" - IsInteractive="@[IsInteractive:Bool:False]" + IsInteractive="@[IsInteractive:Bool:True]" TickSpacing="@[TickSpacing:Slider:30:10-30]" ScaleWidth="@[ScaleWidth:Slider:4:4-50]" MinAngle="@[MinAngle:Slider:210:0-360]" MaxAngle="@[MaxAngle:Slider:150:0-360]" Unit="units" - NeedleWidth="@[NeedleWidth:Slider:4:1-10]" - TickLength="@[TickLength:Slider:10:0-30]" /> + NeedleWidth="@[NeedleWidth:Slider:4:1-10]" + NeedleLength="@[NeedleLength:Slider:100:20-100]" + TickLength="@[TickLength:Slider:10:0-30]" + TickWidth="@[TickWidth:Slider:4:0-30]" + ScalePadding="@[ScalePadding:Slider:23:0-100]@" + ScaleTickWidth="@[ScaleTickWidth:Slider:4:2-20]@" /> \ No newline at end of file diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.cs b/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.cs index a49603970cf..c61a28b44ba 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.cs @@ -71,7 +71,7 @@ public class RadialGauge : Control /// Identifies the NeedleBrush dependency property. /// public static readonly DependencyProperty NeedleBrushProperty = - DependencyProperty.Register(nameof(NeedleBrush), typeof(SolidColorBrush), typeof(RadialGauge), new PropertyMetadata(new SolidColorBrush(Colors.Red), OnFaceChanged)); + DependencyProperty.Register(nameof(NeedleBrush), typeof(SolidColorBrush), typeof(RadialGauge), new PropertyMetadata(null, OnFaceChanged)); /// /// Identifies the Value dependency property. @@ -89,25 +89,25 @@ public class RadialGauge : Control /// Identifies the TrailBrush dependency property. /// public static readonly DependencyProperty TrailBrushProperty = - DependencyProperty.Register(nameof(TrailBrush), typeof(Brush), typeof(RadialGauge), new PropertyMetadata(new SolidColorBrush(Colors.Orange))); + DependencyProperty.Register(nameof(TrailBrush), typeof(Brush), typeof(RadialGauge), new PropertyMetadata(null)); /// /// Identifies the ScaleBrush dependency property. /// public static readonly DependencyProperty ScaleBrushProperty = - DependencyProperty.Register(nameof(ScaleBrush), typeof(Brush), typeof(RadialGauge), new PropertyMetadata(new SolidColorBrush(Colors.DarkGray))); + DependencyProperty.Register(nameof(ScaleBrush), typeof(Brush), typeof(RadialGauge), new PropertyMetadata(null)); /// /// Identifies the ScaleTickBrush dependency property. /// public static readonly DependencyProperty ScaleTickBrushProperty = - DependencyProperty.Register(nameof(ScaleTickBrush), typeof(Brush), typeof(RadialGauge), new PropertyMetadata(new SolidColorBrush(Colors.Black), OnFaceChanged)); + DependencyProperty.Register(nameof(ScaleTickBrush), typeof(Brush), typeof(RadialGauge), new PropertyMetadata(null, OnFaceChanged)); /// /// Identifies the TickBrush dependency property. /// public static readonly DependencyProperty TickBrushProperty = - DependencyProperty.Register(nameof(TickBrush), typeof(SolidColorBrush), typeof(RadialGauge), new PropertyMetadata(new SolidColorBrush(Colors.White), OnFaceChanged)); + DependencyProperty.Register(nameof(TickBrush), typeof(SolidColorBrush), typeof(RadialGauge), new PropertyMetadata(null, OnFaceChanged)); /// /// Identifies the ValueStringFormat dependency property. diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.xaml b/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.xaml index f3227205795..d3161d2bfe2 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.xaml @@ -2,21 +2,14 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:Microsoft.Toolkit.Uwp.UI.Controls"> - - - - - - - - - - - -