ColorPicker Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Presents a color spectrum, a palette of colors, and color channel sliders for user selection of a color.
[Windows.UI.Xaml.TemplatePart(Name="AlphaChannelSlider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))]
[Windows.UI.Xaml.TemplatePart(Name="AlphaChannelTextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))]
[Windows.UI.Xaml.TemplatePart(Name="Channel1Slider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))]
[Windows.UI.Xaml.TemplatePart(Name="Channel1TextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))]
[Windows.UI.Xaml.TemplatePart(Name="Channel2Slider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))]
[Windows.UI.Xaml.TemplatePart(Name="Channel2TextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))]
[Windows.UI.Xaml.TemplatePart(Name="Channel3Slider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))]
[Windows.UI.Xaml.TemplatePart(Name="Channel3TextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground1Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground2Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground3Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground4Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground5Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground6Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground7Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground8Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground9Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground10Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="ColorSpectrumControl", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ColorSpectrum))]
[Windows.UI.Xaml.TemplatePart(Name="ColorSpectrumAlphaSlider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))]
[Windows.UI.Xaml.TemplatePart(Name="ColorSpectrumThirdDimensionSlider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))]
[Windows.UI.Xaml.TemplatePart(Name="HexInputTextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))]
[Windows.UI.Xaml.TemplatePart(Name="HsvToggleButton", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ToggleButton))]
[Windows.UI.Xaml.TemplatePart(Name="RgbToggleButton", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ToggleButton))]
[Windows.UI.Xaml.TemplatePart(Name="P1PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="P2PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="N1PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="N2PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))]
public class ColorPicker : Windows.UI.Xaml.Controls.ColorPicker
[Windows.UI.Xaml.TemplatePart(Name="AlphaChannelSlider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))]
[Windows.UI.Xaml.TemplatePart(Name="AlphaChannelTextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))]
[Windows.UI.Xaml.TemplatePart(Name="Channel1Slider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))]
[Windows.UI.Xaml.TemplatePart(Name="Channel1TextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))]
[Windows.UI.Xaml.TemplatePart(Name="Channel2Slider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))]
[Windows.UI.Xaml.TemplatePart(Name="Channel2TextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))]
[Windows.UI.Xaml.TemplatePart(Name="Channel3Slider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))]
[Windows.UI.Xaml.TemplatePart(Name="Channel3TextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground1Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground2Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground3Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground4Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground5Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground6Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground7Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground8Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground9Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground10Border", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="ColorSpectrumAlphaSlider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))]
[Windows.UI.Xaml.TemplatePart(Name="ColorSpectrumThirdDimensionSlider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))]
[Windows.UI.Xaml.TemplatePart(Name="HexInputTextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))]
[Windows.UI.Xaml.TemplatePart(Name="HsvToggleButton", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ToggleButton))]
[Windows.UI.Xaml.TemplatePart(Name="RgbToggleButton", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ToggleButton))]
[Windows.UI.Xaml.TemplatePart(Name="P1PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="P2PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="N1PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="N2PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))]
[Windows.UI.Xaml.TemplatePart(Name="ColorPanelSelector", Type=typeof(Windows.UI.Xaml.Controls.ListBox))]
[Windows.UI.Xaml.TemplatePart(Name="ColorSpectrumControl", Type=typeof(Microsoft.UI.Xaml.Controls.Primitives.ColorSpectrum))]
public class ColorPicker : Microsoft.UI.Xaml.Controls.ColorPicker
[<Windows.UI.Xaml.TemplatePart(Name="AlphaChannelSlider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))>]
[<Windows.UI.Xaml.TemplatePart(Name="AlphaChannelTextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))>]
[<Windows.UI.Xaml.TemplatePart(Name="Channel1Slider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))>]
[<Windows.UI.Xaml.TemplatePart(Name="Channel1TextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))>]
[<Windows.UI.Xaml.TemplatePart(Name="Channel2Slider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))>]
[<Windows.UI.Xaml.TemplatePart(Name="Channel2TextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))>]
[<Windows.UI.Xaml.TemplatePart(Name="Channel3Slider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))>]
[<Windows.UI.Xaml.TemplatePart(Name="Channel3TextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground1Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground2Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground3Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground4Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground5Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground6Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground7Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground8Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground9Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground10Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="ColorSpectrumControl", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ColorSpectrum))>]
[<Windows.UI.Xaml.TemplatePart(Name="ColorSpectrumAlphaSlider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))>]
[<Windows.UI.Xaml.TemplatePart(Name="ColorSpectrumThirdDimensionSlider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))>]
[<Windows.UI.Xaml.TemplatePart(Name="HexInputTextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))>]
[<Windows.UI.Xaml.TemplatePart(Name="HsvToggleButton", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ToggleButton))>]
[<Windows.UI.Xaml.TemplatePart(Name="RgbToggleButton", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ToggleButton))>]
[<Windows.UI.Xaml.TemplatePart(Name="P1PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="P2PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="N1PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="N2PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
type ColorPicker = class
inherit ColorPicker
[<Windows.UI.Xaml.TemplatePart(Name="AlphaChannelSlider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))>]
[<Windows.UI.Xaml.TemplatePart(Name="AlphaChannelTextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))>]
[<Windows.UI.Xaml.TemplatePart(Name="Channel1Slider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))>]
[<Windows.UI.Xaml.TemplatePart(Name="Channel1TextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))>]
[<Windows.UI.Xaml.TemplatePart(Name="Channel2Slider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))>]
[<Windows.UI.Xaml.TemplatePart(Name="Channel2TextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))>]
[<Windows.UI.Xaml.TemplatePart(Name="Channel3Slider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))>]
[<Windows.UI.Xaml.TemplatePart(Name="Channel3TextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground1Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground2Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground3Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground4Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground5Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground6Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground7Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground8Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground9Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="CheckeredBackground10Border", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="ColorSpectrumAlphaSlider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))>]
[<Windows.UI.Xaml.TemplatePart(Name="ColorSpectrumThirdDimensionSlider", Type=typeof(Microsoft.Toolkit.Uwp.UI.Controls.Primitives.ColorPickerSlider))>]
[<Windows.UI.Xaml.TemplatePart(Name="HexInputTextBox", Type=typeof(Windows.UI.Xaml.Controls.TextBox))>]
[<Windows.UI.Xaml.TemplatePart(Name="HsvToggleButton", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ToggleButton))>]
[<Windows.UI.Xaml.TemplatePart(Name="RgbToggleButton", Type=typeof(Windows.UI.Xaml.Controls.Primitives.ToggleButton))>]
[<Windows.UI.Xaml.TemplatePart(Name="P1PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="P2PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="N1PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="N2PreviewBorder", Type=typeof(Windows.UI.Xaml.Controls.Border))>]
[<Windows.UI.Xaml.TemplatePart(Name="ColorPanelSelector", Type=typeof(Windows.UI.Xaml.Controls.ListBox))>]
[<Windows.UI.Xaml.TemplatePart(Name="ColorSpectrumControl", Type=typeof(Microsoft.UI.Xaml.Controls.Primitives.ColorSpectrum))>]
type ColorPicker = class
inherit ColorPicker
Public Class ColorPicker
Inherits ColorPicker
- Inheritance
-
Windows.UI.Xaml.Controls.ColorPickerColorPicker
- Inheritance
-
Microsoft.UI.Xaml.Controls.ColorPickerColorPicker
- Attributes
-
Windows.UI.Xaml.TemplatePartAttribute
Constructors
ColorPicker() |
Initializes a new instance of the ColorPicker class. |
Fields
CustomPaletteColorsProperty |
Identifies the CustomPaletteColors dependency property. |
CustomPaletteColumnCountProperty |
Identifies the CustomPaletteColumnCount dependency property. |
CustomPaletteProperty |
Identifies the CustomPalette dependency property. |
IsColorPaletteVisibleProperty |
Identifies the IsColorPaletteVisible dependency property. |
Properties
CustomPalette |
Gets or sets the custom color palette. This will automatically set CustomPaletteColors and CustomPaletteColumnCount overwriting any existing values. |
CustomPaletteColors |
Gets the list of custom palette colors. |
CustomPaletteColumnCount |
Gets or sets the number of colors in each row (section) of the custom color palette. Within a standard palette, rows are shades and columns are unique colors. |
IsColorPaletteVisible |
Gets or sets a value indicating whether the color palette is visible. |
Methods
Finalize() |
Finalizes an instance of the ColorPicker class. |
OnApplyTemplate() |
Overrides when a template is applied in order to get the required controls. |