Class ColorPickerButton
Implements a drop-down button control for selecting colors.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class ColorPickerButton : ButtonAdv, ISupportOffice2007Theme, ISupportThemeChanged, IMessageFilter, IThemeProvider, IVisualStyle
Remarks
The ColorPickerButton class is a button-type control that pops-up an instance of the Syncfusion ColorUIControl when clicked. This class derives from the Windows Forms Button class and hence can be used in place of a regular button control. The ColorPickerButton's ColorUIControl component can be accessed through the ColorUI property. ColorUIControl
Constructors
ColorPickerButton()
Creates a new instance of the ColorPickerButton class.
Declaration
public ColorPickerButton()
Properties
AccessibilityEnabled
Gets or sets a value indicating whether the control should enable its Accessibility support.
Declaration
public bool AccessibilityEnabled { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ColorGroups
Gets or sets the tab associated with this colorgroup in the drop-down ColorUIControl.
Declaration
public ColorUIGroups ColorGroups { get; set; }
Property Value
| Type | Description |
|---|---|
| ColorUIGroups | A ColorUIGroups value. The default is ColorUIGroups.All. |
ColorUI
Gets a reference to the drop-down ColorUIControl.
Declaration
public ColorUIControl ColorUI { get; }
Property Value
| Type | Description |
|---|---|
| ColorUIControl | A reference to the ColorUIControl instance. |
ColorUISize
Gets or sets the size of the drop-down ColorUIControl.
Declaration
public Size ColorUISize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.Size | A Size value. |
CustomTabName
Gets or sets the text displayed on the drop-down ColorUIControl's custom colors tab.
Declaration
public string CustomTabName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | A String value. |
DropDownContainer
Gets a reference to the PopupControlContainer that will contain the ColorUIControl.
Declaration
public PopupControlContainer DropDownContainer { get; }
Property Value
| Type | Description |
|---|---|
| PopupControlContainer | A reference to the PopupControlContainer instance. |
DroppedDown
Gets or sets the visibility ColorUIControl drop down.
Declaration
public virtual bool DroppedDown { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True if the drop-down is visible; False otherwise. By default, it is False. |
EnableTouchMode
Gets or sets the touchmode of ColorUIControl is enable.
Declaration
public override bool EnableTouchMode { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Overrides
Font
Overrides the base class font property.
Declaration
public override Font Font { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Font |
Overrides
SelectedAsBackcolor
Gets or sets a value whether SelectedColor is set as the backcolor.
Declaration
public bool SelectedAsBackcolor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True if the SelectedColor is used; False otherwise. By default, it is False. |
SelectedAsText
Gets or sets a value whether SelectedColor is set as the text.
Declaration
public bool SelectedAsText { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | True if the SelectedColor is used; false otherwise. By default, it is False. |
SelectedColor
Gets or sets the current selected color.
Declaration
public Color SelectedColor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.Color | A color value. |
SelectedColorGroup
Gets or sets the tab associated with this colorgroup as the selected tab in the drop-down ColorUIControl.
Declaration
public ColorUISelectedGroup SelectedColorGroup { get; set; }
Property Value
| Type | Description |
|---|---|
| ColorUISelectedGroup | A ColorUISelectedGroup value. |
StandardTabName
Gets or sets the text displayed on the drop-down ColorUIControl's standard colors tab.
Declaration
public string StandardTabName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | A String value. |
SystemTabName
Gets or sets the text displayed on the drop-down ColorUIControl's system colors tab.
Declaration
public string SystemTabName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | A String value. |
Methods
ArgToRadians(Int64)
Declaration
protected static double ArgToRadians(long arg)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | arg |
Returns
| Type |
|---|
| System.Double |
CreateAccessibilityInstance()
Creates a new accessibility object in ColorPickerButton.
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
| Type | Description |
|---|---|
| System.Windows.Forms.AccessibleObject | Returns a new System.Windows.Forms.AccessibleObject for the ColorPickerButton |
CreateDropdownContainer()
Creates a default instance of a PopupControlContainer.
Declaration
protected virtual PopupControlContainer CreateDropdownContainer()
Returns
| Type | Description |
|---|---|
| PopupControlContainer | The PopupControlContainer instance. |
Dispose(Boolean)
Overridden. See System.Windows.Forms.Control.Dispose.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
Overrides
DropdownContainerBeforePopup(Object, CancelEventArgs)
Declaration
protected virtual void DropdownContainerBeforePopup(object sender, CancelEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | |
| System.ComponentModel.CancelEventArgs | e |
DropdownContainerCloseUp(Object, PopupClosedEventArgs)
Declaration
protected virtual void DropdownContainerCloseUp(object sender, PopupClosedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | |
| PopupClosedEventArgs | e |
DropdownContainerPopup(Object, EventArgs)
Declaration
protected virtual void DropdownContainerPopup(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | sender | |
| System.EventArgs | e |
GetControlName()
Returns the name of the control.
Declaration
protected override string GetControlName()
Returns
| Type |
|---|
| System.String |
Overrides
InitializeDropdownContainer()
Initializes the drop-down container. Adds a ColorUIControl.
Declaration
protected virtual void InitializeDropdownContainer()
OnClick(EventArgs)
Overridden. See System.Windows.Forms.Control.OnClick.
Declaration
protected override void OnClick(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
Overrides
OnFontChanged(EventArgs)
Sets the font to ColorUI control
Declaration
protected override void OnFontChanged(EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.EventArgs | e |
Overrides
OnKeyDown(KeyEventArgs)
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.KeyEventArgs | e |
Overrides
ResetCustomTabName()
Resets the CustomTabName property to its default value.
Declaration
public virtual void ResetCustomTabName()
ResetSelectedColor()
Resets the SelectedColor property to its default value.
Declaration
public virtual void ResetSelectedColor()
ResetStandardTabName()
Resets the StandardTabName property to its default value.
Declaration
public virtual void ResetStandardTabName()
ResetSystemTabName()
Resets the SystemTabName property to its default value.
Declaration
public virtual void ResetSystemTabName()
ShouldSerializeCustomTabName()
Declaration
protected bool ShouldSerializeCustomTabName()
Returns
| Type |
|---|
| System.Boolean |
ShouldSerializeSelectedColor()
Declaration
protected bool ShouldSerializeSelectedColor()
Returns
| Type |
|---|
| System.Boolean |
ShouldSerializeStandardTabName()
Declaration
protected bool ShouldSerializeStandardTabName()
Returns
| Type |
|---|
| System.Boolean |
ShouldSerializeSystemTabName()
Declaration
protected bool ShouldSerializeSystemTabName()
Returns
| Type |
|---|
| System.Boolean |
WndProc(ref Message)
Declaration
protected override void WndProc(ref Message m)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Message | m |
Events
ColorSelected
The ColorSelected event occurs when a color is selected from the drop-down ColorUIControl.
Declaration
public event EventHandler ColorSelected
Event Type
| Type |
|---|
| System.EventHandler |