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.
[Microsoft.UI.Xaml.TemplatePart(Name="AlphaChannelSlider", Type=typeof(CommunityToolkit.WinUI.UI.Controls.Primitives.ColorPickerSlider))]
[Microsoft.UI.Xaml.TemplatePart(Name="AlphaChannelTextBox", Type=typeof(Microsoft.UI.Xaml.Controls.TextBox))]
[Microsoft.UI.Xaml.TemplatePart(Name="Channel1Slider", Type=typeof(CommunityToolkit.WinUI.UI.Controls.Primitives.ColorPickerSlider))]
[Microsoft.UI.Xaml.TemplatePart(Name="Channel1TextBox", Type=typeof(Microsoft.UI.Xaml.Controls.TextBox))]
[Microsoft.UI.Xaml.TemplatePart(Name="Channel2Slider", Type=typeof(CommunityToolkit.WinUI.UI.Controls.Primitives.ColorPickerSlider))]
[Microsoft.UI.Xaml.TemplatePart(Name="Channel2TextBox", Type=typeof(Microsoft.UI.Xaml.Controls.TextBox))]
[Microsoft.UI.Xaml.TemplatePart(Name="Channel3Slider", Type=typeof(CommunityToolkit.WinUI.UI.Controls.Primitives.ColorPickerSlider))]
[Microsoft.UI.Xaml.TemplatePart(Name="Channel3TextBox", Type=typeof(Microsoft.UI.Xaml.Controls.TextBox))]
[Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground1Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
[Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground2Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
[Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground3Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
[Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground4Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
[Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground5Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
[Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground6Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
[Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground7Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
[Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground8Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
[Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground9Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
[Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground10Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
[Microsoft.UI.Xaml.TemplatePart(Name="ColorSpectrumControl", Type=typeof(Microsoft.UI.Xaml.Controls.Primitives.ColorSpectrum))]
[Microsoft.UI.Xaml.TemplatePart(Name="ColorSpectrumAlphaSlider", Type=typeof(CommunityToolkit.WinUI.UI.Controls.Primitives.ColorPickerSlider))]
[Microsoft.UI.Xaml.TemplatePart(Name="ColorSpectrumThirdDimensionSlider", Type=typeof(CommunityToolkit.WinUI.UI.Controls.Primitives.ColorPickerSlider))]
[Microsoft.UI.Xaml.TemplatePart(Name="HexInputTextBox", Type=typeof(Microsoft.UI.Xaml.Controls.TextBox))]
[Microsoft.UI.Xaml.TemplatePart(Name="HsvToggleButton", Type=typeof(Microsoft.UI.Xaml.Controls.Primitives.ToggleButton))]
[Microsoft.UI.Xaml.TemplatePart(Name="RgbToggleButton", Type=typeof(Microsoft.UI.Xaml.Controls.Primitives.ToggleButton))]
[Microsoft.UI.Xaml.TemplatePart(Name="P1PreviewBorder", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
[Microsoft.UI.Xaml.TemplatePart(Name="P2PreviewBorder", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
[Microsoft.UI.Xaml.TemplatePart(Name="N1PreviewBorder", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
[Microsoft.UI.Xaml.TemplatePart(Name="N2PreviewBorder", Type=typeof(Microsoft.UI.Xaml.Controls.Border))]
public class ColorPicker : Microsoft.UI.Xaml.Controls.ColorPicker
[<Microsoft.UI.Xaml.TemplatePart(Name="AlphaChannelSlider", Type=typeof(CommunityToolkit.WinUI.UI.Controls.Primitives.ColorPickerSlider))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="AlphaChannelTextBox", Type=typeof(Microsoft.UI.Xaml.Controls.TextBox))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="Channel1Slider", Type=typeof(CommunityToolkit.WinUI.UI.Controls.Primitives.ColorPickerSlider))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="Channel1TextBox", Type=typeof(Microsoft.UI.Xaml.Controls.TextBox))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="Channel2Slider", Type=typeof(CommunityToolkit.WinUI.UI.Controls.Primitives.ColorPickerSlider))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="Channel2TextBox", Type=typeof(Microsoft.UI.Xaml.Controls.TextBox))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="Channel3Slider", Type=typeof(CommunityToolkit.WinUI.UI.Controls.Primitives.ColorPickerSlider))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="Channel3TextBox", Type=typeof(Microsoft.UI.Xaml.Controls.TextBox))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground1Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground2Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground3Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground4Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground5Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground6Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground7Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground8Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground9Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="CheckeredBackground10Border", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="ColorSpectrumControl", Type=typeof(Microsoft.UI.Xaml.Controls.Primitives.ColorSpectrum))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="ColorSpectrumAlphaSlider", Type=typeof(CommunityToolkit.WinUI.UI.Controls.Primitives.ColorPickerSlider))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="ColorSpectrumThirdDimensionSlider", Type=typeof(CommunityToolkit.WinUI.UI.Controls.Primitives.ColorPickerSlider))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="HexInputTextBox", Type=typeof(Microsoft.UI.Xaml.Controls.TextBox))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="HsvToggleButton", Type=typeof(Microsoft.UI.Xaml.Controls.Primitives.ToggleButton))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="RgbToggleButton", Type=typeof(Microsoft.UI.Xaml.Controls.Primitives.ToggleButton))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="P1PreviewBorder", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="P2PreviewBorder", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="N1PreviewBorder", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="N2PreviewBorder", Type=typeof(Microsoft.UI.Xaml.Controls.Border))>]
type ColorPicker = class
inherit ColorPicker
Public Class ColorPicker
Inherits ColorPicker
- Inheritance
-
Microsoft.UI.Xaml.Controls.ColorPickerColorPicker
- Attributes
-
Microsoft.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. |