ColorPicker Class

Namespace
MahApps.Metro.Controls
Base Types
graph BT Type-->Base0["ColorPickerBase"] click Base0 "/api/MahApps.Metro.Controls/ColorPickerBase" Base0-->Base1["Control"] Type["ColorPicker"] class Type type-node

Syntax

[TemplatePart(Name = "PART_Popup", Type = typeof(Popup))]
[TemplatePart(Name = "PART_ColorPaletteStandard", Type = typeof(ColorPalette))]
[TemplatePart(Name = "PART_ColorPaletteAvailable", Type = typeof(ColorPalette))]
[TemplatePart(Name = "PART_ColorPaletteCustom01", Type = typeof(ColorPalette))]
[TemplatePart(Name = "PART_ColorPaletteCustom02", Type = typeof(ColorPalette))]
[TemplatePart(Name = "PART_ColorPaletteRecent", Type = typeof(ColorPalette))]
[TemplatePart(Name = "PART_PopupTabControl", Type = typeof(TabControl))]
[TemplatePart(Name = "PART_ColorPalettesTab", Type = typeof(TabItem))]
[TemplatePart(Name = "PART_AdvancedTab", Type = typeof(TabItem))]
[StyleTypedProperty(Property = nameof(StandardColorPaletteStyle), StyleTargetType = typeof(ColorPalette))]
[StyleTypedProperty(Property = nameof(AvailableColorPaletteStyle), StyleTargetType = typeof(ColorPalette))]
[StyleTypedProperty(Property = nameof(CustomColorPalette01Style), StyleTargetType = typeof(ColorPalette))]
[StyleTypedProperty(Property = nameof(RecentColorPaletteStyle), StyleTargetType = typeof(ColorPalette))]
[StyleTypedProperty(Property = nameof(CustomColorPalette02Style), StyleTargetType = typeof(ColorPalette))]
[StyleTypedProperty(Property = nameof(TabControlStyle), StyleTargetType = typeof(TabControl))]
[StyleTypedProperty(Property = nameof(TabItemStyle), StyleTargetType = typeof(TabItem))]
public class ColorPicker : ColorPickerBase

Attributes

Type Description
TemplatePart
TemplatePart
TemplatePart
TemplatePart
TemplatePart
TemplatePart
TemplatePart
TemplatePart
TemplatePart
StyleTypedProperty
StyleTypedProperty
StyleTypedProperty
StyleTypedProperty
StyleTypedProperty
StyleTypedProperty
StyleTypedProperty

Events

Name Type Summary
DropDownClosed EventHandler<EventArgs>
Occurs when the DropDown is closed.
DropDownOpened EventHandler<EventArgs>
Occurs when the DropDown is opened.
SelectedColorChanged RoutedPropertyChangedEventHandler<Color?>
Occurs when the SelectedColor property is changed.
Inherited from ColorPickerBase

Fields

Name Constant Value Summary
AddToRecentColorsTriggerProperty
Identifies the AddToRecentColorsTrigger dependency property.
static
AdvancedTabHeaderProperty
Identifies the AdvancedTabHeader dependency property.
static
AdvancedTabHeaderTemplateProperty
Identifies the AdvancedTabHeaderTemplate dependency property.
static
AProperty
Identifies the A dependency property.
Inherited from ColorPickerBase
static
AvailableColorPaletteHeaderProperty
Identifies the AvailableColorPaletteHeader dependency property.
static
AvailableColorPaletteHeaderTemplateProperty
Identifies the AvailableColorPaletteHeaderTemplate dependency property.
static
AvailableColorPaletteItemsSourceProperty
Identifies the AvailableColorPaletteItemsSource dependency property.
static
AvailableColorPaletteStyleProperty
Identifies the AvailableColorPaletteStyle dependency property.
static
BProperty
Identifies the B dependency property.
Inherited from ColorPickerBase
static
ColorIsUpdating
Inherited from ColorPickerBase
ColorNameProperty
Identifies the ColorName dependency property.
Inherited from ColorPickerBase
static
ColorNamesDictionaryProperty
Identifies the ColorNamesDictionary dependency property.
Inherited from ColorPickerBase
static
ColorPalettesTabHeaderProperty
Identifies the ColorPalettesTabHeader dependency property.
static
ColorPalettesTabHeaderTemplateProperty
Identifies the ColorPalettesTabHeaderTemplate dependency property.
static
CustomColorPalette01HeaderProperty
Identifies the CustomColorPalette01Header dependency property.
static
CustomColorPalette01HeaderTemplateProperty
Identifies the CustomColorPalette01HeaderTemplate dependency property.
static
CustomColorPalette01ItemsSourceProperty
Identifies the CustomColorPalette01ItemsSource dependency property.
static
CustomColorPalette01StyleProperty
Identifies the CustomColorPalette01Style dependency property.
static
CustomColorPalette02HeaderProperty
Identifies the CustomColorPalette02Header dependency property.
static
CustomColorPalette02HeaderTemplateProperty
Identifies the CustomColorPalette02HeaderTemplate dependency property.
static
CustomColorPalette02ItemsSourceProperty
Identifies the CustomColorPalette02ItemsSource dependency property.
static
CustomColorPalette02StyleProperty
Identifies the CustomColorPalette02Style dependency property.
static
DefaultColorProperty
Identifies the DefaultColor dependency property.
Inherited from ColorPickerBase
static
DropDownClosedEvent
Identifies the DropDownClosed routed event.
static
DropDownHeightProperty
Identifies the DropDownHeight dependency property.
static
DropDownOpenedEvent
Identifies the DropDownOpened routed event.
static
DropDownWidthProperty
Identifies the DropDownWidth dependency property.
static
GProperty
Identifies the G dependency property.
Inherited from ColorPickerBase
static
HueProperty
Identifies the Hue dependency property.
Inherited from ColorPickerBase
static
IsAdvancedTabVisibleProperty
Identifies the IsAdvancedTabVisible dependency property.
static
IsAvailableColorPaletteVisibleProperty
Identifies the IsAvailableColorPaletteVisible dependency property.
static
IsColorPalettesTabVisibleProperty
Identifies the IsColorPalettesTabVisible dependency property.
static
IsCustomColorPalette01VisibleProperty
Identifies the IsCustomColorPalette01Visible dependency property.
static
IsCustomColorPalette02VisibleProperty
Identifies the IsCustomColorPalette02Visible dependency property.
static
IsDropDownOpenProperty
Identifies the IsDropDownOpen dependency property.
static
IsRecentColorPaletteVisibleProperty
Identifies the IsRecentColorPaletteVisible dependency property.
static
IsStandardColorPaletteVisibleProperty
Identifies the IsStandardColorPaletteVisible dependency property.
static
LabelAlphaChannelProperty
Identifies the LabelAlphaChannel dependency property.
Inherited from ColorPickerBase
static
LabelBlueChannelProperty
Identifies the LabelBlueChannel dependency property.
Inherited from ColorPickerBase
static
LabelColorNameProperty
Identifies the LabelColorName dependency property.
Inherited from ColorPickerBase
static
LabelColorPreviewProperty
Identifies the LabelColorPreview dependency property.
Inherited from ColorPickerBase
static
LabelGreenChannelProperty
Identifies the LabelGreenChannel dependency property.
Inherited from ColorPickerBase
static
LabelHueChannelProperty
Identifies the LabelHueChannel dependency property.
Inherited from ColorPickerBase
static
LabelRedChannelProperty
Identifies the LabelRedChannel dependency property.
Inherited from ColorPickerBase
static
LabelSaturationChannelProperty
Identifies the LabelSaturationChannel dependency property.
Inherited from ColorPickerBase
static
LabelValueChannelProperty
Identifies the LabelValueChannel dependency property.
Inherited from ColorPickerBase
static
RecentColorPaletteHeaderProperty
Identifies the RecentColorPaletteHeader dependency property.
static
RecentColorPaletteHeaderTemplateProperty
Identifies the RecentColorPaletteHeaderTemplate dependency property.
static
RecentColorPaletteItemsSourceProperty
Identifies the RecentColorPaletteItemsSource dependency property.
static
RecentColorPaletteStyleProperty
Identifies the RecentColorPaletteStyle dependency property.
static
RProperty
Identifies the R dependency property.
Inherited from ColorPickerBase
static
SaturationProperty
Identifies the Saturation dependency property.
Inherited from ColorPickerBase
static
SelectedColorChangedEvent
Identifies the SelectedColorChanged routed event.
Inherited from ColorPickerBase
static
SelectedColorProperty
Identifies the SelectedColor dependency property.
Inherited from ColorPickerBase
static
SelectedColorTemplateProperty
Identifies the SelectedColorTemplate dependency property.
static
SelectedHSVColorProperty
Identifies the SelectedHSVColor dependency property.
Inherited from ColorPickerBase
static
StandardColorPaletteHeaderProperty
Identifies the StandardColorPaletteHeader dependency property.
static
StandardColorPaletteHeaderTemplateProperty
Identifies the StandardColorPaletteHeaderTemplate dependency property.
static
StandardColorPaletteItemsSourceProperty
Identifies the StandardColorPaletteItemsSource dependency property.
static
StandardColorPaletteStyleProperty
Identifies the StandardColorPaletteStyle dependency property.
static
TabControlStyleProperty
Identifies the TabControlStyle dependency property.
static
TabItemStyleProperty
Identifies the TabItemStyle dependency property.
static
UpdateHsvValues
Inherited from ColorPickerBase
ValueProperty
Identifies the Value dependency property.
Inherited from ColorPickerBase
static

Properties

Name Value Summary
A byte
Gets or sets the Alpha-Channel
Inherited from ColorPickerBase
AddToRecentColorsTrigger AddToRecentColorsTrigger
Gets or sets when to add the SelectedColor to the RecentColorPaletteItemsSource
AdvancedTabHeader object
Gets or sets the HeaderedContentControl.Header for the ColorCanvas TabItem.
AdvancedTabHeaderTemplate DataTemplate
Gets or sets the HeaderedContentControl.HeaderTemplate for the ColorCanvas TabItem.
AvailableColorPaletteHeader object
Gets or sets the Header of the available ColorPalette.
AvailableColorPaletteHeaderTemplate DataTemplate
Gets or sets the HeaderTemplate of the available ColorPalette.
AvailableColorPaletteItemsSource IEnumerable
Gets or sets the ItemsControl.ItemsSource of the available ColorPalette.
AvailableColorPaletteStyle Style
Gets or sets the FrameworkElement.Style of the available ColorPalette.
B byte
Gets or sets the Blue-Channel
Inherited from ColorPickerBase
ColorName string
Gets or sets the name of the SelectedColor.
Inherited from ColorPickerBase
ColorNamesDictionary Dictionary<Color?, string>
Gets or sets a Dictionary<TKey, TValue> for looking up the ColorName
Inherited from ColorPickerBase
ColorPalettesTabHeader object
Gets or sets the HeaderedContentControl.Header for the ColorPalette TabItem.
ColorPalettesTabHeaderTemplate DataTemplate
Gets or sets the HeaderedContentControl.HeaderTemplate for the ColorPalette TabItem.
CustomColorPalette01Header object
Gets or sets the Header of the custom ColorPalette (1/2).
CustomColorPalette01HeaderTemplate DataTemplate
Gets or sets the HeaderTemplate of the custom ColorPalette (1/2).
CustomColorPalette01ItemsSource IEnumerable
Gets or sets the ItemsControl.ItemsSource of the custom ColorPalette (1/2).
CustomColorPalette01Style Style
Gets or sets the FrameworkElement.Style of the custom ColorPalette (1/2).
CustomColorPalette02Header object
Gets or sets the Header of the custom ColorPalette (2/2).
CustomColorPalette02HeaderTemplate DataTemplate
Gets or sets the HeaderTemplate of the custom ColorPalette (2/2).
CustomColorPalette02ItemsSource IEnumerable
Gets or sets the ItemsControl.ItemsSource of the custom ColorPalette (2/2).
CustomColorPalette02Style Style
Gets or sets the FrameworkElement.Style of the custom ColorPalette (2/2).
DefaultColor Color?
Gets or sets a default selected Color
Inherited from ColorPickerBase
DropDownHeight double
Gets or sets the height of the DropDown.
DropDownWidth double
Gets or sets the width of the DropDown.
G byte
Gets or sets the Green-Channel
Inherited from ColorPickerBase
Hue double
Gets or sets the Hue-Channel
Inherited from ColorPickerBase
IsAdvancedTabVisible bool
Gets or sets the visibility of the ColorCanvas TabItem.
IsAvailableColorPaletteVisible bool
Gets or sets the visibility of the available ColorPalette.
IsColorPalettesTabVisible bool
Gets or sets the visibility of the ColorPalette TabItem.
IsCustomColorPalette01Visible bool
Gets or sets the visibility of the custom ColorPalette (1/2).
IsCustomColorPalette02Visible bool
Gets or sets the visibility of the custom ColorPalette (2/2).
IsDropDownOpen bool
Whether or not the "popup" for this control is currently open
IsRecentColorPaletteVisible bool
Gets or sets the visibility of the recent ColorPalette.
IsStandardColorPaletteVisible bool
Gets or sets the visibility of the standard ColorPalette.
LabelAlphaChannel object
Gets or sets the label for the Alpha-Channel in the UI
Inherited from ColorPickerBase
LabelBlueChannel object
Gets or sets the label for the Blue-Channel in the UI
Inherited from ColorPickerBase
LabelColorName object
Gets or sets the label for the ColorName in the UI
Inherited from ColorPickerBase
LabelColorPreview object
Gets or sets the label for the Preview in the UI
Inherited from ColorPickerBase
LabelGreenChannel object
Gets or sets the label for the Green-Channel in the UI
Inherited from ColorPickerBase
LabelHueChannel object
Gets or sets the label for the Hue-Channel in the UI
Inherited from ColorPickerBase
LabelRedChannel object
Gets or sets the label for the Red-Channel in the UI
Inherited from ColorPickerBase
LabelSaturationChannel object
Gets or sets the label for the Saturation-Channel in the UI
Inherited from ColorPickerBase
LabelValueChannel object
Gets or sets the label for the Value-Channel in the UI
Inherited from ColorPickerBase
R byte
Gets or sets the Red-Channel
Inherited from ColorPickerBase
RecentColorPaletteHeader object
Gets or sets the Header of the recent ColorPalette.
RecentColorPaletteHeaderTemplate DataTemplate
Gets or sets the HeaderTemplate of the recent ColorPalette.
RecentColorPaletteItemsSource IEnumerable
Gets or sets the ItemsControl.ItemsSource of the recent ColorPalette.
RecentColorPaletteStyle Style
Gets or sets the FrameworkElement.Style of the recent ColorPalette.
Saturation double
Gets or sets the Saturation-Channel
Inherited from ColorPickerBase
SelectedColor Color?
Gets or sets the selected Color.
Inherited from ColorPickerBase
SelectedColorTemplate DataTemplate
Gets or sets the DataTemplate for the SelectedColor
SelectedHSVColor HSVColor
Gets the SelectedColor as HSVColor. This property is read only.
Inherited from ColorPickerBase
StandardColorPaletteHeader object
Gets or sets the Header of the standard ColorPalette.
StandardColorPaletteHeaderTemplate object
Gets or sets the HeaderTemplate of the standard ColorPalette.
StandardColorPaletteItemsSource IEnumerable
Gets or sets the ItemsControl.ItemsSource of the standard ColorPalette.
StandardColorPaletteStyle Style
Gets or sets the FrameworkElement.Style of the standard ColorPalette.
TabControlStyle Style
Gets or sets the Style for the TabControl.
TabItemStyle Style
Gets or sets the Style for the TabItem
Value double
Gets or sets the Value-Channel
Inherited from ColorPickerBase

Methods

Name Value Summary
OnApplyTemplate() void