HypernovaDesktop Components · docs
Binarymission
WPFColor Picker › ExtendedOfficeColorPicker

ExtendedOfficeColorPicker

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.Pickers

A custom control that provides a color picker functionality like that seen in MS Office applications.

public class ExtendedOfficeColorPicker : Control

Inherits from / implements: Control

Remarks

The control has two main parts viz., a combobox like control that displays the selected color, with a small rectangle filled with the selected color and a textual representation of the color itself, and a drop-down click button part that when clicked drops down a color palette window, from where the user can choose colors.
The main property of interest in this control is the SelectedColorBrush, and the event SelectedColorChanged.

Members at a glance

AnimationTypeGets or sets the type of animation to use.
ColorBoxMouseOverBorderBrushGets or sets the brush to use when drawing the border around the "color box" in the drop-down color palette window.
ColorsWindowPopupBorderBrushGets or sets the colors window popup border brush.
ColorsWindowPopupBorderThicknessGets or sets the colors window popup border thickness.
ColorsWindowPopupContentBorderBrushGets or sets the colors window popup content border brush.
ColorsWindowPopupContentBorderThicknessGets or sets the colors window popup content border thickness.
CustomColorsPopupInternalViewBackgroundGets or sets the custom colors pop-up internal view background brush.
CustomColorsPopupWindowBorderBrushThe brush used for the border of the custom-colors popup window.
CustomColorsPopupWindowBorderThicknessGets or sets the border thickness for drawing the border around the custom colors pop-up window.
CustomColorsPopupWindowCustomColorSetCommandVisualTextGets or sets the custom colors popup window custom color set command visual text.
CustomColorsPopupWindowLabelTextAlternativeInstructionGets or sets the custom colors popup window label text alternative instruction.
CustomColorsPopupWindowLabelTextSelectColorInstructionGets or sets the custom colors popup window label text select color instruction.
CustomColorsPopupWindowRgbPanelBorderBrushGets or sets the custom colors popup window RGB panel border brush.
DropDownArrowFillGets or sets the drop down arrow fill color brush.
DropDownButtonBackgroundGets or sets the drop down button background.
DropDownButtonOnHoverBackgroundGets or sets the drop down button on-hover background.
IsColorPaletteWindowCurvedEdgedGets or sets a value indicating whether the color palette window has curved edges.
IsControlWindowCurvedEdgedGets or sets a value indicating whether control's window has curved edges.
IsEnabledBorderAroundSelectedColorIndicatorFillGets or sets a value indicating whether to enable border around selected color indicator fill.
IsHostBorderDrawingEnabledForCustomColorsWindowGets or sets whether to draw the thick border around the custom colors popup window.
MoreColorsLabelTextGets or sets the "More colors" label text.
PopupWindowBackgroundGets or sets the popup window background brush.
SelectedColorBrushGets or sets the selected color brush.
SelectedColorIndicatorFillBorderBrushGets or sets the selected color indicator fill border brush.
SelectedColorIndicatorIndicatorBorderThicknessGets or sets the selected color indicator indicator border thickness.
SelectedColorNameGets or sets the name of the selected color.
SelectedColorTextForegroundGets or sets the selected color text brush.
ShouldDisplayAlphaValueGets or sets a value indicating whether to display alpha value in the control.
StandardColorsLabelTextGets or sets the "standard colors" label text.
ThemeColorsLabelTextGets or sets the "theme colors" label text.
OnApplyTemplateWhen overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
SelectedColorChangedOccurs when the selected color changes.
AnimationTypePropertyIdentifies the AnimationType dependency property.
ColorBoxMouseOverBorderBrushPropertyIdentifies the ColorBoxMouseOverBorderBrush dependency property.
ColorsWindowPopupBorderBrushPropertyThe colors window popup border brush property
ColorsWindowPopupBorderThicknessPropertyThe colors window popup border thickness property
ColorsWindowPopupContentBorderBrushPropertyThe colors window popup content border brush property
ColorsWindowPopupContentBorderThicknessPropertyThe colors window popup content border thickness property
CustomColorsPopupInternalViewBackgroundPropertyThe custom colors pop-up internal view background brush property
CustomColorsPopupWindowBorderBrushPropertyIdentifies the CustomColorsPopupWindowBorderBrush dependency property.
CustomColorsPopupWindowBorderThicknessPropertyIdentifies the CustomColorsPopupWindowBorderThickness dependency property.
CustomColorsPopupWindowCustomColorSetCommandVisualTextPropertyThe custom colors popup window custom color set command visual text property
CustomColorsPopupWindowLabelTextAlternativeInstructionPropertyThe custom colors popup window label text alternative instruction property
CustomColorsPopupWindowLabelTextSelectColorInstructionPropertyThe custom colors popup window label text select color instruction property
CustomColorsPopupWindowRgbPanelBorderBrushPropertyIdentifies the CustomColorsPopupWindowRgbPanelBorderBrush dependency property.
DropDownArrowFillPropertyIdentifies the DropDownArrowFill dependency property.
DropDownButtonBackgroundPropertyThe drop down button background property
DropDownButtonOnHoverBackgroundPropertyThe drop down button on-hover background property
IsColorPaletteWindowCurvedEdgedPropertyIdentifies the IsColorPaletteWindowCurvedEdged dependency property.
IsControlWindowCurvedEdgedPropertyIdentifies the IsControlWindowCurvedEdged dependency property.
IsEnabledBorderAroundSelectedColorIndicatorFillPropertyIdentifies the IsEnabledBorderAroundSelectedColorIndicatorFill dependency property.
IsHostBorderDrawingEnabledForCustomColorsWindowPropertyIdentifies the IsHostBorderDrawingEnabledForCustomColorsWindow dependency property.
MoreColorsLabelTextPropertyIdentifies the MoreColorsLabelText dependency property.
PopupWindowBackgroundPropertyIdentifies the PopupWindowBackground dependency property.
SelectedColorBrushPropertyIdentifies the SelectedColorBrush dependency property.
SelectedColorChangedEventThe selected color changed event
SelectedColorIndicatorFillBorderBrushPropertyIdentifies the SelectedColorIndicatorFillBorderBrush dependency property.
SelectedColorIndicatorIndicatorBorderThicknessPropertyThe selected color indicator indicator border thickness property
SelectedColorTextForegroundPropertyIdentifies the SelectedColorTextForeground dependency property.
ShouldDisplayAlphaValuePropertyIdentifies the ShouldDisplayAlphaValue dependency property.
StandardColorsLabelTextPropertyIdentifies the StandardColorsLabelText dependency property.
ThemeColorsLabelTextPropertyIdentifies the ThemeColorsLabelText dependency property.

Properties

AnimationType

public PopupAnimation AnimationType

Gets or sets the type of animation to use.

Value. The animation styles from the PopupAnimation enumeration.

ColorBoxMouseOverBorderBrush

public SolidColorBrush ColorBoxMouseOverBorderBrush

Gets or sets the brush to use when drawing the border around the "color box" in the drop-down color palette window.

Value. The color box mouse over border brush.

ColorsWindowPopupBorderBrush

public Brush ColorsWindowPopupBorderBrush

Gets or sets the colors window popup border brush.

Value. The colors window popup border brush.

ColorsWindowPopupBorderThickness

public int ColorsWindowPopupBorderThickness

Gets or sets the colors window popup border thickness.

Value. The colors window popup border thickness.

ColorsWindowPopupContentBorderBrush

public Brush ColorsWindowPopupContentBorderBrush

Gets or sets the colors window popup content border brush.

Value. The colors window popup content border brush.

ColorsWindowPopupContentBorderThickness

public int ColorsWindowPopupContentBorderThickness

Gets or sets the colors window popup content border thickness.

Value. The colors window popup content border thickness.

CustomColorsPopupInternalViewBackground

public Brush CustomColorsPopupInternalViewBackground

Gets or sets the custom colors pop-up internal view background brush.

Value. The custom colors pop-up internal view background brush.

CustomColorsPopupWindowBorderBrush

public Brush CustomColorsPopupWindowBorderBrush

The brush used for the border of the custom-colors popup window.

CustomColorsPopupWindowBorderThickness

public double CustomColorsPopupWindowBorderThickness

Gets or sets the border thickness for drawing the border around the custom colors pop-up window.

CustomColorsPopupWindowCustomColorSetCommandVisualText

public string CustomColorsPopupWindowCustomColorSetCommandVisualText

Gets or sets the custom colors popup window custom color set command visual text.

Value. The custom colors popup window custom color set command visual text.

CustomColorsPopupWindowLabelTextAlternativeInstruction

public string CustomColorsPopupWindowLabelTextAlternativeInstruction

Gets or sets the custom colors popup window label text alternative instruction.

Value. The custom colors popup window label text alternative instruction.

CustomColorsPopupWindowLabelTextSelectColorInstruction

public string CustomColorsPopupWindowLabelTextSelectColorInstruction

Gets or sets the custom colors popup window label text select color instruction.

Value. The custom colors popup window label text select color instruction.

CustomColorsPopupWindowRgbPanelBorderBrush

public Brush CustomColorsPopupWindowRgbPanelBorderBrush

Gets or sets the custom colors popup window RGB panel border brush.

Value. The custom colors popup window RGB panel border brush.

DropDownArrowFill

public Brush DropDownArrowFill

Gets or sets the drop down arrow fill color brush.

Value. The drop down arrow fill color brush.

DropDownButtonBackground

public Brush DropDownButtonBackground

Gets or sets the drop down button background.

Value. The drop down button background.

DropDownButtonOnHoverBackground

public Brush DropDownButtonOnHoverBackground

Gets or sets the drop down button on-hover background.

Value. The drop down button on hover background.

IsColorPaletteWindowCurvedEdged

public bool IsColorPaletteWindowCurvedEdged

Gets or sets a value indicating whether the color palette window has curved edges.

IsControlWindowCurvedEdged

public bool IsControlWindowCurvedEdged

Gets or sets a value indicating whether control's window has curved edges.

IsEnabledBorderAroundSelectedColorIndicatorFill

public bool IsEnabledBorderAroundSelectedColorIndicatorFill

Gets or sets a value indicating whether to enable border around selected color indicator fill.

IsHostBorderDrawingEnabledForCustomColorsWindow

public bool IsHostBorderDrawingEnabledForCustomColorsWindow

Gets or sets whether to draw the thick border around the custom colors popup window.

MoreColorsLabelText

public string MoreColorsLabelText

Gets or sets the "More colors" label text.

Value. The more colors label text.

PopupWindowBackground

public Brush PopupWindowBackground

Gets or sets the popup window background brush.

Value. The popup window background brush.

SelectedColorBrush

public SolidColorBrush SelectedColorBrush

Gets or sets the selected color brush.

Value. The selected color brush.

SelectedColorIndicatorFillBorderBrush

public Brush SelectedColorIndicatorFillBorderBrush

Gets or sets the selected color indicator fill border brush.

Value. The selected color indicator fill border brush.

SelectedColorIndicatorIndicatorBorderThickness

public int SelectedColorIndicatorIndicatorBorderThickness

Gets or sets the selected color indicator indicator border thickness.

Value. The selected color indicator indicator border thickness.

SelectedColorName

public string SelectedColorName

Gets or sets the name of the selected color.

Value. The name of the selected color.

SelectedColorTextForeground

public Brush SelectedColorTextForeground

Gets or sets the selected color text brush.

Value. The selected color text brush.

ShouldDisplayAlphaValue

public bool ShouldDisplayAlphaValue

Gets or sets a value indicating whether to display alpha value in the control.

StandardColorsLabelText

public string StandardColorsLabelText

Gets or sets the "standard colors" label text.

Value. The standard colors label text.

ThemeColorsLabelText

public string ThemeColorsLabelText

Gets or sets the "theme colors" label text.

Value. The theme colors label text.

Methods

OnApplyTemplate

public override void OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.

Events

SelectedColorChanged

public event RoutedEventHandler SelectedColorChanged

Occurs when the selected color changes.

Fields

AnimationTypeProperty

public static readonly DependencyProperty AnimationTypeProperty

Identifies the AnimationType dependency property.

ColorBoxMouseOverBorderBrushProperty

public static readonly DependencyProperty ColorBoxMouseOverBorderBrushProperty

Identifies the ColorBoxMouseOverBorderBrush dependency property.

ColorsWindowPopupBorderBrushProperty

public static readonly DependencyProperty ColorsWindowPopupBorderBrushProperty

The colors window popup border brush property

ColorsWindowPopupBorderThicknessProperty

public static readonly DependencyProperty ColorsWindowPopupBorderThicknessProperty

The colors window popup border thickness property

ColorsWindowPopupContentBorderBrushProperty

public static readonly DependencyProperty ColorsWindowPopupContentBorderBrushProperty

The colors window popup content border brush property

ColorsWindowPopupContentBorderThicknessProperty

public static readonly DependencyProperty ColorsWindowPopupContentBorderThicknessProperty

The colors window popup content border thickness property

CustomColorsPopupInternalViewBackgroundProperty

public static readonly DependencyProperty CustomColorsPopupInternalViewBackgroundProperty

The custom colors pop-up internal view background brush property

CustomColorsPopupWindowBorderBrushProperty

public static readonly DependencyProperty CustomColorsPopupWindowBorderBrushProperty

Identifies the CustomColorsPopupWindowBorderBrush dependency property.

CustomColorsPopupWindowBorderThicknessProperty

public static readonly DependencyProperty CustomColorsPopupWindowBorderThicknessProperty

Identifies the CustomColorsPopupWindowBorderThickness dependency property.

CustomColorsPopupWindowCustomColorSetCommandVisualTextProperty

public static readonly DependencyProperty CustomColorsPopupWindowCustomColorSetCommandVisualTextProperty

The custom colors popup window custom color set command visual text property

CustomColorsPopupWindowLabelTextAlternativeInstructionProperty

public static readonly DependencyProperty CustomColorsPopupWindowLabelTextAlternativeInstructionProperty

The custom colors popup window label text alternative instruction property

CustomColorsPopupWindowLabelTextSelectColorInstructionProperty

public static readonly DependencyProperty CustomColorsPopupWindowLabelTextSelectColorInstructionProperty

The custom colors popup window label text select color instruction property

CustomColorsPopupWindowRgbPanelBorderBrushProperty

public static readonly DependencyProperty CustomColorsPopupWindowRgbPanelBorderBrushProperty

Identifies the CustomColorsPopupWindowRgbPanelBorderBrush dependency property.

DropDownArrowFillProperty

public static readonly DependencyProperty DropDownArrowFillProperty

Identifies the DropDownArrowFill dependency property.

DropDownButtonBackgroundProperty

public static readonly DependencyProperty DropDownButtonBackgroundProperty

The drop down button background property

DropDownButtonOnHoverBackgroundProperty

public static readonly DependencyProperty DropDownButtonOnHoverBackgroundProperty

The drop down button on-hover background property

IsColorPaletteWindowCurvedEdgedProperty

public static readonly DependencyProperty IsColorPaletteWindowCurvedEdgedProperty

Identifies the IsColorPaletteWindowCurvedEdged dependency property.

IsControlWindowCurvedEdgedProperty

public static readonly DependencyProperty IsControlWindowCurvedEdgedProperty

Identifies the IsControlWindowCurvedEdged dependency property.

IsEnabledBorderAroundSelectedColorIndicatorFillProperty

public static readonly DependencyProperty IsEnabledBorderAroundSelectedColorIndicatorFillProperty

Identifies the IsEnabledBorderAroundSelectedColorIndicatorFill dependency property.

IsHostBorderDrawingEnabledForCustomColorsWindowProperty

public static readonly DependencyProperty IsHostBorderDrawingEnabledForCustomColorsWindowProperty

Identifies the IsHostBorderDrawingEnabledForCustomColorsWindow dependency property.

MoreColorsLabelTextProperty

public static readonly DependencyProperty MoreColorsLabelTextProperty

Identifies the MoreColorsLabelText dependency property.

PopupWindowBackgroundProperty

public static readonly DependencyProperty PopupWindowBackgroundProperty

Identifies the PopupWindowBackground dependency property.

SelectedColorBrushProperty

public static readonly DependencyProperty SelectedColorBrushProperty

Identifies the SelectedColorBrush dependency property.

SelectedColorChangedEvent

public static readonly RoutedEvent SelectedColorChangedEvent

The selected color changed event

SelectedColorIndicatorFillBorderBrushProperty

public static readonly DependencyProperty SelectedColorIndicatorFillBorderBrushProperty

Identifies the SelectedColorIndicatorFillBorderBrush dependency property.

SelectedColorIndicatorIndicatorBorderThicknessProperty

public static readonly DependencyProperty SelectedColorIndicatorIndicatorBorderThicknessProperty

The selected color indicator indicator border thickness property

SelectedColorTextForegroundProperty

public static readonly DependencyProperty SelectedColorTextForegroundProperty

Identifies the SelectedColorTextForeground dependency property.

ShouldDisplayAlphaValueProperty

public static readonly DependencyProperty ShouldDisplayAlphaValueProperty

Identifies the ShouldDisplayAlphaValue dependency property.

StandardColorsLabelTextProperty

public static readonly DependencyProperty StandardColorsLabelTextProperty

Identifies the StandardColorsLabelText dependency property.

ThemeColorsLabelTextProperty

public static readonly DependencyProperty ThemeColorsLabelTextProperty

Identifies the ThemeColorsLabelText dependency property.