|
15 | 15 | using Windows.UI.Xaml.Controls.Primitives;
|
16 | 16 | using Windows.UI.Xaml.Media;
|
17 | 17 | using ColorPickerSlider = Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider;
|
| 18 | +using ColorSpectrum = Microsoft.UI.Xaml.Controls.Primitives.ColorSpectrum; |
18 | 19 |
|
19 | 20 | namespace Microsoft.Toolkit.Uwp.UI.Controls
|
20 | 21 | {
|
@@ -52,7 +53,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
|
52 | 53 | [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.")]
|
53 | 54 | [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.")]
|
54 | 55 | [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.")]
|
55 |
| - public partial class ColorPicker : Windows.UI.Xaml.Controls.ColorPicker |
| 56 | + public partial class ColorPicker : Microsoft.UI.Xaml.Controls.ColorPicker |
56 | 57 | {
|
57 | 58 | internal Color CheckerBackgroundColor { get; set; } = Color.FromArgb(0x19, 0x80, 0x80, 0x80); // Overridden later
|
58 | 59 |
|
@@ -122,6 +123,7 @@ public partial class ColorPicker : Windows.UI.Xaml.Controls.ColorPicker
|
122 | 123 | public ColorPicker()
|
123 | 124 | {
|
124 | 125 | this.DefaultStyleKey = typeof(ColorPicker);
|
| 126 | + this.DefaultStyleResourceUri = new System.Uri("ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Input/Themes/Generic.xaml"); |
125 | 127 |
|
126 | 128 | // Setup collections
|
127 | 129 | this.SetValue(CustomPaletteColorsProperty, new ObservableCollection<Color>());
|
@@ -486,22 +488,22 @@ private ColorChannel GetActiveColorSpectrumThirdDimension()
|
486 | 488 | {
|
487 | 489 | switch (this.ColorSpectrumComponents)
|
488 | 490 | {
|
489 |
| - case Windows.UI.Xaml.Controls.ColorSpectrumComponents.SaturationValue: |
490 |
| - case Windows.UI.Xaml.Controls.ColorSpectrumComponents.ValueSaturation: |
| 491 | + case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.SaturationValue: |
| 492 | + case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.ValueSaturation: |
491 | 493 | {
|
492 | 494 | // Hue
|
493 | 495 | return ColorChannel.Channel1;
|
494 | 496 | }
|
495 | 497 |
|
496 |
| - case Windows.UI.Xaml.Controls.ColorSpectrumComponents.HueValue: |
497 |
| - case Windows.UI.Xaml.Controls.ColorSpectrumComponents.ValueHue: |
| 498 | + case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.HueValue: |
| 499 | + case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.ValueHue: |
498 | 500 | {
|
499 | 501 | // Saturation
|
500 | 502 | return ColorChannel.Channel2;
|
501 | 503 | }
|
502 | 504 |
|
503 |
| - case Windows.UI.Xaml.Controls.ColorSpectrumComponents.HueSaturation: |
504 |
| - case Windows.UI.Xaml.Controls.ColorSpectrumComponents.SaturationHue: |
| 505 | + case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.HueSaturation: |
| 506 | + case Microsoft.UI.Xaml.Controls.ColorSpectrumComponents.SaturationHue: |
505 | 507 | {
|
506 | 508 | // Value
|
507 | 509 | return ColorChannel.Channel3;
|
@@ -1125,7 +1127,7 @@ private void DispatcherQueueTimer_Tick(object sender, object e)
|
1125 | 1127 | ***************************************************************************************/
|
1126 | 1128 |
|
1127 | 1129 | /// <summary>
|
1128 |
| - /// Callback for when the <see cref="Windows.UI.Xaml.Controls.ColorPicker.Color"/> dependency property value changes. |
| 1130 | + /// Callback for when the <see cref="Microsoft.UI.Xaml.Controls.ColorPicker.Color"/> dependency property value changes. |
1129 | 1131 | /// </summary>
|
1130 | 1132 | private void OnColorChanged(DependencyObject d, DependencyProperty e)
|
1131 | 1133 | {
|
@@ -1226,7 +1228,7 @@ private void CustomPaletteColors_CollectionChanged(object sender, NotifyCollecti
|
1226 | 1228 | /// Event handler for when the color spectrum color is changed.
|
1227 | 1229 | /// This occurs when the user presses on the spectrum to select a new color.
|
1228 | 1230 | /// </summary>
|
1229 |
| - private void ColorSpectrum_ColorChanged(ColorSpectrum sender, Windows.UI.Xaml.Controls.ColorChangedEventArgs args) |
| 1231 | + private void ColorSpectrum_ColorChanged(ColorSpectrum sender, Microsoft.UI.Xaml.Controls.ColorChangedEventArgs args) |
1230 | 1232 | {
|
1231 | 1233 | // It is OK in this case to use the RGB representation
|
1232 | 1234 | this.ScheduleColorUpdate(this.ColorSpectrumControl.Color);
|
|
0 commit comments