From 950894a4948775a953e93e84d403d40a577ff702 Mon Sep 17 00:00:00 2001 From: robloo Date: Fri, 16 Apr 2021 14:33:31 -0400 Subject: [PATCH 1/7] Fix ColorPicker CustomPaletteColors default property value --- .../ColorPicker/ColorPicker.Properties.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.Properties.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.Properties.cs index b21772a2ea9..72fa7339cf7 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.Properties.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.Properties.cs @@ -20,7 +20,7 @@ public partial class ColorPicker nameof(CustomPaletteColors), typeof(ObservableCollection), typeof(ColorPicker), - new PropertyMetadata(Windows.UI.Color.FromArgb(0x00, 0x00, 0x00, 0x00))); + new PropertyMetadata(DependencyProperty.UnsetValue)); /// /// Gets the list of custom palette colors. From 21a97858b6ddea9d36d0ff4b0296ba8611e69d9c Mon Sep 17 00:00:00 2001 From: robloo Date: Thu, 22 Apr 2021 23:15:15 -0400 Subject: [PATCH 2/7] Use null instead of UnsetValue for default property values --- .../ColorPicker/ColorPicker.Properties.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.Properties.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.Properties.cs index 72fa7339cf7..1ec5deb495b 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.Properties.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.Properties.cs @@ -20,7 +20,7 @@ public partial class ColorPicker nameof(CustomPaletteColors), typeof(ObservableCollection), typeof(ColorPicker), - new PropertyMetadata(DependencyProperty.UnsetValue)); + new PropertyMetadata(null)); /// /// Gets the list of custom palette colors. @@ -64,7 +64,7 @@ public int CustomPaletteColumnCount nameof(CustomPalette), typeof(IColorPalette), typeof(ColorPicker), - new PropertyMetadata(DependencyProperty.UnsetValue)); + new PropertyMetadata(null)); /// /// Gets or sets the custom color palette. From 3c5b8ac764610d9c239ca1041d1f6231d047db5d Mon Sep 17 00:00:00 2001 From: robloo Date: Thu, 22 Apr 2021 23:29:15 -0400 Subject: [PATCH 3/7] Switch to the WinUI ColorSpectrum --- .../ColorPicker/ColorPicker.cs | 3 +- .../ColorPicker/ColorPicker.xaml | 37 ++++++++++--------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs index 98ed480a8c7..ec58cc3e7b7 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs @@ -15,6 +15,7 @@ using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Media; using ColorPickerSlider = Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider; +using ColorSpectrum = Microsoft.UI.Xaml.Controls.Primitives.ColorSpectrum; namespace Microsoft.Toolkit.Uwp.UI.Controls { @@ -1226,7 +1227,7 @@ private void CustomPaletteColors_CollectionChanged(object sender, NotifyCollecti /// Event handler for when the color spectrum color is changed. /// This occurs when the user presses on the spectrum to select a new color. /// - private void ColorSpectrum_ColorChanged(ColorSpectrum sender, Windows.UI.Xaml.Controls.ColorChangedEventArgs args) + private void ColorSpectrum_ColorChanged(ColorSpectrum sender, Microsoft.UI.Xaml.Controls.ColorChangedEventArgs args) { // It is OK in this case to use the RGB representation this.ScheduleColorUpdate(this.ColorSpectrumControl.Color); diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.xaml b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.xaml index 120ed76bf49..b9f25bd0664 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.xaml @@ -4,7 +4,8 @@ xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters" xmlns:localconverters="using:Microsoft.Toolkit.Uwp.UI.Controls.ColorPickerConverters" xmlns:primitives="using:Microsoft.Toolkit.Uwp.UI.Controls.Primitives" - xmlns:ui="using:Microsoft.Toolkit.Uwp.UI"> + xmlns:ui="using:Microsoft.Toolkit.Uwp.UI" + xmlns:winuiprimitives="using:Microsoft.UI.Xaml.Controls.Primitives"> @@ -120,23 +121,23 @@ Orientation="Vertical" /> - + Date: Thu, 22 Apr 2021 23:51:58 -0400 Subject: [PATCH 4/7] Remove exceptions in ColorPicker converters and use UnsetValue --- .../ColorPicker/ColorToColorShadeConverter.cs | 9 ++++++--- .../ColorPicker/ColorToHexConverter.cs | 10 +++++++--- .../ColorPicker/ContrastBrushConverter.cs | 6 ++++-- .../Converters/ColorToDisplayNameConverter.cs | 6 ++++-- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorToColorShadeConverter.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorToColorShadeConverter.cs index a74e6e4ae54..f7676c93c8b 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorToColorShadeConverter.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorToColorShadeConverter.cs @@ -5,6 +5,7 @@ using System; using Microsoft.Toolkit.Uwp.Helpers; using Windows.UI; +using Windows.UI.Xaml; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Media; @@ -40,7 +41,8 @@ public object Convert( } else { - throw new ArgumentException("Invalid color value provided"); + // Invalid color value provided + return DependencyProperty.UnsetValue; } // Get the value component delta @@ -50,7 +52,8 @@ public object Convert( } catch { - throw new ArgumentException("Invalid parameter provided, unable to convert to integer"); + // Invalid parameter provided, unable to convert to integer + return DependencyProperty.UnsetValue; } // Specially handle minimum (black) and maximum (white) @@ -119,7 +122,7 @@ public object ConvertBack( object parameter, string language) { - throw new NotImplementedException(); + return DependencyProperty.UnsetValue; } } } diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorToHexConverter.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorToHexConverter.cs index b460c8820fa..268094d502e 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorToHexConverter.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorToHexConverter.cs @@ -5,6 +5,7 @@ using System; using Microsoft.Toolkit.Uwp.Helpers; using Windows.UI; +using Windows.UI.Xaml; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Media; @@ -34,7 +35,8 @@ public object Convert( } else { - throw new ArgumentException("Invalid color value provided"); + // Invalid color value provided + return DependencyProperty.UnsetValue; } string hexColor = color.ToHex().Replace("#", string.Empty); @@ -58,7 +60,8 @@ public object ConvertBack( } catch { - throw new ArgumentException("Invalid hex color value provided"); + // Invalid hex color value provided + return DependencyProperty.UnsetValue; } } else @@ -69,7 +72,8 @@ public object ConvertBack( } catch { - throw new ArgumentException("Invalid hex color value provided"); + // Invalid hex color value provided + return DependencyProperty.UnsetValue; } } } diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ContrastBrushConverter.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ContrastBrushConverter.cs index abd1dc1dbd7..b08611531ce 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ContrastBrushConverter.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ContrastBrushConverter.cs @@ -4,6 +4,7 @@ using System; using Windows.UI; +using Windows.UI.Xaml; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Media; @@ -40,7 +41,8 @@ public object Convert( } else { - throw new ArgumentException("Invalid color value provided"); + // Invalid color value provided + return DependencyProperty.UnsetValue; } // Get the default color when transparency is high @@ -81,7 +83,7 @@ public object ConvertBack( object parameter, string language) { - throw new NotImplementedException(); + return DependencyProperty.UnsetValue; } /// diff --git a/Microsoft.Toolkit.Uwp.UI/Converters/ColorToDisplayNameConverter.cs b/Microsoft.Toolkit.Uwp.UI/Converters/ColorToDisplayNameConverter.cs index 5aa9a78cefe..5eb2b901be9 100644 --- a/Microsoft.Toolkit.Uwp.UI/Converters/ColorToDisplayNameConverter.cs +++ b/Microsoft.Toolkit.Uwp.UI/Converters/ColorToDisplayNameConverter.cs @@ -4,6 +4,7 @@ using System; using Windows.UI; +using Windows.UI.Xaml; using Windows.UI.Xaml.Data; using Windows.UI.Xaml.Media; @@ -33,7 +34,8 @@ public object Convert( } else { - throw new ArgumentException("Invalid color value provided"); + // Invalid color value provided + return DependencyProperty.UnsetValue; } return ColorHelper.ToDisplayName(color); @@ -46,7 +48,7 @@ public object ConvertBack( object parameter, string language) { - throw new NotImplementedException(); + return DependencyProperty.UnsetValue; } } } \ No newline at end of file From 34bbbc8134524b8545bd02c322c8099fa2af8896 Mon Sep 17 00:00:00 2001 From: robloo Date: Fri, 23 Apr 2021 00:22:17 -0400 Subject: [PATCH 5/7] Derive from the WinUI ColorPicker --- .../ColorPicker/ColorPicker.cs | 17 +++++++++-------- .../ColorPicker/ColorPickerButton.cs | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs index ec58cc3e7b7..6d8ce7d30ef 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs @@ -53,7 +53,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1501:Statement should not be on a single line", Justification = "Inline brackets are used to improve code readability with repeated null checks.")] [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1025:Code should not contain multiple whitespace in a row", Justification = "Whitespace is used to align code in columns for readability.")] [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.NamingRules", "SA1306:Field names should begin with lower-case letter", Justification = "Only template parts start with a capital letter. This differentiates them from other fields.")] - public partial class ColorPicker : Windows.UI.Xaml.Controls.ColorPicker + public partial class ColorPicker : Microsoft.UI.Xaml.Controls.ColorPicker { internal Color CheckerBackgroundColor { get; set; } = Color.FromArgb(0x19, 0x80, 0x80, 0x80); // Overridden later @@ -123,6 +123,7 @@ public partial class ColorPicker : Windows.UI.Xaml.Controls.ColorPicker public ColorPicker() { this.DefaultStyleKey = typeof(ColorPicker); + this.DefaultStyleResourceUri = new System.Uri("ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Input/Themes/Generic.xaml"); // Setup collections this.SetValue(CustomPaletteColorsProperty, new ObservableCollection()); @@ -487,22 +488,22 @@ private ColorChannel GetActiveColorSpectrumThirdDimension() { switch (this.ColorSpectrumComponents) { - case Windows.UI.Xaml.Controls.ColorSpectrumComponents.SaturationValue: - case Windows.UI.Xaml.Controls.ColorSpectrumComponents.ValueSaturation: + case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.SaturationValue: + case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.ValueSaturation: { // Hue return ColorChannel.Channel1; } - case Windows.UI.Xaml.Controls.ColorSpectrumComponents.HueValue: - case Windows.UI.Xaml.Controls.ColorSpectrumComponents.ValueHue: + case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.HueValue: + case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.ValueHue: { // Saturation return ColorChannel.Channel2; } - case Windows.UI.Xaml.Controls.ColorSpectrumComponents.HueSaturation: - case Windows.UI.Xaml.Controls.ColorSpectrumComponents.SaturationHue: + case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.HueSaturation: + case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.SaturationHue: { // Value return ColorChannel.Channel3; @@ -1126,7 +1127,7 @@ private void DispatcherQueueTimer_Tick(object sender, object e) ***************************************************************************************/ /// - /// Callback for when the dependency property value changes. + /// Callback for when the dependency property value changes. /// private void OnColorChanged(DependencyObject d, DependencyProperty e) { diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPickerButton.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPickerButton.cs index 057735d3dd9..28c8cd07674 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPickerButton.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPickerButton.cs @@ -142,7 +142,7 @@ protected override void OnApplyTemplate() } } - private void ColorPicker_ColorChanged(Windows.UI.Xaml.Controls.ColorPicker sender, ColorChangedEventArgs args) + private void ColorPicker_ColorChanged(Microsoft.UI.Xaml.Controls.ColorPicker sender, Microsoft.UI.Xaml.Controls.ColorChangedEventArgs args) { SelectedColor = args.NewColor; } From 0b13dc60b7f02473616c78d83ab4b260a588fa0f Mon Sep 17 00:00:00 2001 From: robloo Date: Thu, 29 Apr 2021 19:55:51 -0400 Subject: [PATCH 6/7] Revert "Switch to the WinUI ColorSpectrum" This reverts commit 3c5b8ac764610d9c239ca1041d1f6231d047db5d. --- .../ColorPicker/ColorPicker.cs | 3 +- .../ColorPicker/ColorPicker.xaml | 37 +++++++++---------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs index 6d8ce7d30ef..c308102c20a 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs @@ -15,7 +15,6 @@ using Windows.UI.Xaml.Controls.Primitives; using Windows.UI.Xaml.Media; using ColorPickerSlider = Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider; -using ColorSpectrum = Microsoft.UI.Xaml.Controls.Primitives.ColorSpectrum; namespace Microsoft.Toolkit.Uwp.UI.Controls { @@ -1228,7 +1227,7 @@ private void CustomPaletteColors_CollectionChanged(object sender, NotifyCollecti /// Event handler for when the color spectrum color is changed. /// This occurs when the user presses on the spectrum to select a new color. /// - private void ColorSpectrum_ColorChanged(ColorSpectrum sender, Microsoft.UI.Xaml.Controls.ColorChangedEventArgs args) + private void ColorSpectrum_ColorChanged(ColorSpectrum sender, Windows.UI.Xaml.Controls.ColorChangedEventArgs args) { // It is OK in this case to use the RGB representation this.ScheduleColorUpdate(this.ColorSpectrumControl.Color); diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.xaml b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.xaml index b9f25bd0664..120ed76bf49 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.xaml +++ b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.xaml @@ -4,8 +4,7 @@ xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters" xmlns:localconverters="using:Microsoft.Toolkit.Uwp.UI.Controls.ColorPickerConverters" xmlns:primitives="using:Microsoft.Toolkit.Uwp.UI.Controls.Primitives" - xmlns:ui="using:Microsoft.Toolkit.Uwp.UI" - xmlns:winuiprimitives="using:Microsoft.UI.Xaml.Controls.Primitives"> + xmlns:ui="using:Microsoft.Toolkit.Uwp.UI"> @@ -121,23 +120,23 @@ Orientation="Vertical" /> - + Date: Thu, 29 Apr 2021 19:56:01 -0400 Subject: [PATCH 7/7] Revert "Derive from the WinUI ColorPicker" This reverts commit 34bbbc8134524b8545bd02c322c8099fa2af8896. --- .../ColorPicker/ColorPicker.cs | 17 ++++++++--------- .../ColorPicker/ColorPickerButton.cs | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs index c308102c20a..98ed480a8c7 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.cs @@ -52,7 +52,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1501:Statement should not be on a single line", Justification = "Inline brackets are used to improve code readability with repeated null checks.")] [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1025:Code should not contain multiple whitespace in a row", Justification = "Whitespace is used to align code in columns for readability.")] [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.NamingRules", "SA1306:Field names should begin with lower-case letter", Justification = "Only template parts start with a capital letter. This differentiates them from other fields.")] - public partial class ColorPicker : Microsoft.UI.Xaml.Controls.ColorPicker + public partial class ColorPicker : Windows.UI.Xaml.Controls.ColorPicker { internal Color CheckerBackgroundColor { get; set; } = Color.FromArgb(0x19, 0x80, 0x80, 0x80); // Overridden later @@ -122,7 +122,6 @@ public partial class ColorPicker : Microsoft.UI.Xaml.Controls.ColorPicker public ColorPicker() { this.DefaultStyleKey = typeof(ColorPicker); - this.DefaultStyleResourceUri = new System.Uri("ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Input/Themes/Generic.xaml"); // Setup collections this.SetValue(CustomPaletteColorsProperty, new ObservableCollection()); @@ -487,22 +486,22 @@ private ColorChannel GetActiveColorSpectrumThirdDimension() { switch (this.ColorSpectrumComponents) { - case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.SaturationValue: - case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.ValueSaturation: + case Windows.UI.Xaml.Controls.ColorSpectrumComponents.SaturationValue: + case Windows.UI.Xaml.Controls.ColorSpectrumComponents.ValueSaturation: { // Hue return ColorChannel.Channel1; } - case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.HueValue: - case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.ValueHue: + case Windows.UI.Xaml.Controls.ColorSpectrumComponents.HueValue: + case Windows.UI.Xaml.Controls.ColorSpectrumComponents.ValueHue: { // Saturation return ColorChannel.Channel2; } - case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.HueSaturation: - case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.SaturationHue: + case Windows.UI.Xaml.Controls.ColorSpectrumComponents.HueSaturation: + case Windows.UI.Xaml.Controls.ColorSpectrumComponents.SaturationHue: { // Value return ColorChannel.Channel3; @@ -1126,7 +1125,7 @@ private void DispatcherQueueTimer_Tick(object sender, object e) ***************************************************************************************/ /// - /// Callback for when the dependency property value changes. + /// Callback for when the dependency property value changes. /// private void OnColorChanged(DependencyObject d, DependencyProperty e) { diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPickerButton.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPickerButton.cs index 28c8cd07674..057735d3dd9 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPickerButton.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPickerButton.cs @@ -142,7 +142,7 @@ protected override void OnApplyTemplate() } } - private void ColorPicker_ColorChanged(Microsoft.UI.Xaml.Controls.ColorPicker sender, Microsoft.UI.Xaml.Controls.ColorChangedEventArgs args) + private void ColorPicker_ColorChanged(Windows.UI.Xaml.Controls.ColorPicker sender, ColorChangedEventArgs args) { SelectedColor = args.NewColor; }