diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorChannel.cs b/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorChannel.cs
index 02d2711c0ca..77df7b01c24 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorChannel.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorChannel.cs
@@ -1,4 +1,8 @@
-using System;
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorPicker.cs b/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorPicker.cs
index 2065a620935..d8450eff1b5 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorPicker.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorPicker.cs
@@ -55,6 +55,8 @@ namespace Microsoft.Toolkit.Uwp.UI.Controls
[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
{
+ internal Color CheckerBackgroundColor { get; set; } = Color.FromArgb(0x19, 0x80, 0x80, 0x80); // Overridden later
+
///
/// The period that scheduled color updates will be applied.
/// This is only used when updating colors using the ScheduleColorUpdate() method.
@@ -68,7 +70,6 @@ public partial class ColorPicker : Windows.UI.Xaml.Controls.ColorPicker
private Dictionary cachedSliderSizes = new Dictionary();
private bool callbacksConnected = false;
- internal Color checkerBackgroundColor = Color.FromArgb(0x19, 0x80, 0x80, 0x80); // Overridden later
private bool eventsConnected = false;
private bool isInitialized = false;
@@ -132,7 +133,7 @@ public ColorPicker()
// Checkered background color is found only one time for performance
// This may need to change in the future if theme changes should be supported
- this.checkerBackgroundColor = (Color)Application.Current.Resources["SystemListLowColor"];
+ this.CheckerBackgroundColor = (Color)Application.Current.Resources["SystemListLowColor"];
this.ConnectCallbacks(true);
this.SetDefaultPalette();
@@ -173,7 +174,7 @@ private static bool IsColorEmpty(Color color)
///
protected override void OnApplyTemplate()
{
- // TODO: We need to disconnect old events first.
+ //// TODO: We need to disconnect old events first.
this.ColorSpectrumControl = this.GetTemplateChild(nameof(ColorSpectrumControl));
this.ColorSpectrumAlphaSlider = this.GetTemplateChild(nameof(ColorSpectrumAlphaSlider));
@@ -1068,7 +1069,7 @@ private async void UpdateChannelSliderBackground(Slider slider)
this.GetActiveColorRepresentation(),
ColorChannel.Channel1,
baseColor,
- this.checkerBackgroundColor);
+ this.CheckerBackgroundColor);
}
else if (object.ReferenceEquals(slider, this.Channel2Slider))
{
@@ -1079,7 +1080,7 @@ private async void UpdateChannelSliderBackground(Slider slider)
this.GetActiveColorRepresentation(),
ColorChannel.Channel2,
baseColor,
- this.checkerBackgroundColor);
+ this.CheckerBackgroundColor);
}
else if (object.ReferenceEquals(slider, this.Channel3Slider))
{
@@ -1090,7 +1091,7 @@ private async void UpdateChannelSliderBackground(Slider slider)
this.GetActiveColorRepresentation(),
ColorChannel.Channel3,
baseColor,
- this.checkerBackgroundColor);
+ this.CheckerBackgroundColor);
}
else if (object.ReferenceEquals(slider, this.AlphaChannelSlider))
{
@@ -1101,7 +1102,7 @@ private async void UpdateChannelSliderBackground(Slider slider)
this.GetActiveColorRepresentation(),
ColorChannel.Alpha,
baseColor,
- this.checkerBackgroundColor);
+ this.CheckerBackgroundColor);
}
else if (object.ReferenceEquals(slider, this.ColorSpectrumAlphaSlider))
{
@@ -1112,7 +1113,7 @@ private async void UpdateChannelSliderBackground(Slider slider)
this.GetActiveColorRepresentation(),
ColorChannel.Alpha,
baseColor,
- this.checkerBackgroundColor);
+ this.CheckerBackgroundColor);
}
else if (object.ReferenceEquals(slider, this.ColorSpectrumThirdDimensionSlider))
{
@@ -1123,7 +1124,7 @@ private async void UpdateChannelSliderBackground(Slider slider)
ColorRepresentation.Hsva, // Always HSV
this.GetActiveColorSpectrumThirdDimension(),
baseColor,
- this.checkerBackgroundColor);
+ this.CheckerBackgroundColor);
}
if (bitmap != null)
@@ -1293,7 +1294,7 @@ private async void CheckeredBackgroundBorder_Loaded(object sender, RoutedEventAr
{
await ColorPickerRenderingHelpers.UpdateBorderBackgroundWithCheckerAsync(
sender as Border,
- checkerBackgroundColor);
+ CheckerBackgroundColor);
}
///
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorPickerButton.cs b/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorPickerButton.cs
index efdd02bebec..eb6b25f228b 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorPickerButton.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorPickerButton.cs
@@ -66,9 +66,11 @@ public Style FlyoutPresenterStyle
///
public static readonly DependencyProperty FlyoutPresenterStyleProperty = DependencyProperty.Register("FlyoutPresenterStyle", typeof(Style), typeof(ColorPickerButton), new PropertyMetadata(default(Style)));
+ #pragma warning disable CS0419 // Ambiguous reference in cref attribute
///
/// Gets or sets the selected the user has picked from the .
///
+ #pragma warning restore CS0419 // Ambiguous reference in cref attribute
public Color SelectedColor
{
get { return (Color)GetValue(SelectedColorProperty); }
@@ -149,7 +151,7 @@ private async void CheckeredBackgroundBorder_Loaded(object sender, RoutedEventAr
{
await ColorPickerRenderingHelpers.UpdateBorderBackgroundWithCheckerAsync(
sender as Border,
- ColorPicker.checkerBackgroundColor); // TODO: Check initialization
+ ColorPicker.CheckerBackgroundColor); // TODO: Check initialization
}
}
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorPickerSlider.cs b/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorPickerSlider.cs
index a6cb9fb13ee..f5aaf88c23b 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorPickerSlider.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorPickerSlider.cs
@@ -28,7 +28,9 @@ public class ColorPickerSlider : Slider
private Size oldSize;
private Size measuredSize;
- ///
+ ///
+ /// Initializes a new instance of the class.
+ ///
public ColorPickerSlider()
: base()
{
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorRepresentation.cs b/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorRepresentation.cs
index 9011a1b0d8a..39823709620 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorRepresentation.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/ColorPicker/ColorRepresentation.cs
@@ -1,4 +1,8 @@
-using System;
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/SwitchPresenter/CaseCollection.cs b/Microsoft.Toolkit.Uwp.UI.Controls/SwitchPresenter/CaseCollection.cs
index 26051720ad7..d1f3ee96187 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/SwitchPresenter/CaseCollection.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/SwitchPresenter/CaseCollection.cs
@@ -36,6 +36,9 @@ private void ValueChanged(object sender, EventArgs e)
CaseCollectionChanged?.Invoke(this, EventArgs.Empty);
}
+ ///
+ /// Initializes a new instance of the class.
+ ///
public CaseCollection()
{
}