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

Properties

Name Property Type 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 Return Value Summary
OnApplyTemplate() void