Class ColorPicker
Represents the ColorPicker UI element.
Inheritance
System.Object
ColorPicker
Implements
System.Web.UI.INamingContainer
System.Web.UI.IPostBackEventHandler
System.Web.UI.IPostBackDataHandler
System.Web.UI.IUrlResolutionService
Assembly: Syncfusion.EJ.Web.dll
Syntax
public class ColorPicker : CommonControl, INamingContainer, IPostBackEventHandler, IPostBackDataHandler, IUrlResolutionService
Constructors
ColorPicker()
Declaration
Properties
Gets or sets the mode of the color picker button. Mode can be 'dropdown' or 'split' button.
Declaration
public ButtonMode ButtonMode { get; set; }
Property Value
ClientSideOnChange
Gets or sets a value indicating this event gets fired after color value has been changed successfully.
Declaration
public string ClientSideOnChange { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnClose
Gets or sets a value indicating this event gets fired after the color picker popup closes.
Declaration
public string ClientSideOnClose { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnCreate
Gets or sets a value indicating this event gets fired after color picker is created.
Declaration
public string ClientSideOnCreate { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnDestroy
Gets or sets a value indicating this event gets fired after color picker control has been destroyed.
Declaration
public string ClientSideOnDestroy { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnOpen
Gets or sets a value indicating this event gets fired after the color picker popup opens.
Declaration
public string ClientSideOnOpen { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnSelect
Gets or sets a value indicating this event gets fired after color value has been selected successfully.
Declaration
public string ClientSideOnSelect { get; set; }
Property Value
Type |
Description |
System.String |
|
ColorPickerButtonText
Gets or sets a value to customize the 'Apply', 'Cancel', 'Swatches' button text in the color picker popup.
Declaration
[JsonProperty("buttonText")]
public ColorPickerButtonText ColorPickerButtonText { get; set; }
Property Value
ColorPickerTooltipText
Gets or sets a value to customize tooltip text for each button in swatches, add button, last selected color and current color element.
Declaration
[JsonProperty("tooltipText")]
public ColorPickerTooltipText ColorPickerTooltipText { get; set; }
Property Value
Columns
Gets or sets the number of columns to display the colors in the color palette.
Declaration
public int Columns { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
CssClass
Gets or sets root CSS class to color picker for theme customization.
Declaration
public string CssClass { get; set; }
Property Value
Type |
Description |
System.String |
|
Custom
Gets or sets the custom colors in the palette model. Custom palettes are created by passing a comma delimited string of HEX values or an array of colors.
Declaration
public List<string> Custom { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.List<System.String> |
|
DisplayInline
Gets or sets a value indicating colorpicker popup always in visible state or not.
Declaration
public bool DisplayInline { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Enabled
Gets or sets a value indicating whether the control can respond to user interaction.
Declaration
public bool Enabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnableOpacity
Gets or sets a value indicating the opacity slider to be shown or not.
Declaration
public bool EnableOpacity { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Locale
Gets or sets the culture to display the colorpicker in the specified culture.
Declaration
public string Locale { get; set; }
Property Value
Type |
Description |
System.String |
|
Model
Gets or sets the color picker model object of the color picker properties.
Declaration
public ColorPickerProperties Model { get; set; }
Property Value
ModelType
Gets or sets the model type of the color picker popup. Model type can be 'picker' or 'palette'.
Declaration
public ModelType ModelType { get; set; }
Property Value
OpacityValue
Gets or sets the opacity value of the selected color.
Declaration
public int OpacityValue { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Palette
Gets or sets the palette type to be displayed in the popup. Palette type can be 'basicpalette' or 'custompalette'. This property applicable if 'model type' set as 'palette'.
Declaration
public PaletteType Palette { get; set; }
Property Value
PresetType
Gets or sets the preset type of the palette among 12 different types. Each presets have 50 colors. This property applicable if 'model type' set as 'palette'.
Declaration
public PresetsType PresetType { get; set; }
Property Value
ShowApplyCancel
Gets or sets a value to show/hide the 'Apply' and 'Cancel' buttons in color picker popup.
Declaration
public bool ShowApplyCancel { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Gets or sets a value to show or hide the close button in the rgba field of the color picker popup.
Declaration
public bool ShowClearButton { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ShowPreview
Gets or sets a value indicating the live preview support for current cursor selection color and selected color.
Declaration
public bool ShowPreview { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ShowRecentColors
Gets or sets a value indicating the recent colors to be shown or not.
Declaration
public bool ShowRecentColors { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ShowSwitcher
Gets or sets a value to show or hide switcher button in color picker popup.
Declaration
public bool ShowSwitcher { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Gets or sets a value to show or hide the tooltip to notify the slider value.
Declaration
public bool ShowTooltip { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
TagName
Gets or sets the name of the tag.
Declaration
public string TagName { get; set; }
Property Value
Type |
Description |
System.String |
|
Gets or sets the tool icon to be displayed in dropdown control color area.
Declaration
public string ToolIcon { get; set; }
Property Value
Type |
Description |
System.String |
|
Value
Declaration
public string Value { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
DependentScripts()
Specifies the dependent scripts.
Declaration
public List<string> DependentScripts()
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
|
GetDependentFiles()
Specifies the the dependent files.
Declaration
public override List<string> GetDependentFiles()
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
|
Overrides
LoadViewState(Object)
Restores view-state information from a previous page request.
Declaration
protected override void LoadViewState(object state)
Parameters
Type |
Name |
Description |
System.Object |
state |
|
Overrides
OnPreRender(EventArgs)
Modifying server controls before sending them to the client.
Declaration
protected override void OnPreRender(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
PostBackEventHandler(String, Dictionary<String, Object>)
Specifies the server side events.
Declaration
public override void PostBackEventHandler(string EventName, Dictionary<string, object> args)
Parameters
Type |
Name |
Description |
System.String |
EventName |
|
System.Collections.Generic.Dictionary<System.String, System.Object> |
args |
|
Overrides
Render()
Renders the color picker instance.
Declaration
Returns
Type |
Description |
System.String |
|
Render(HtmlTextWriter)
Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
Type |
Name |
Description |
System.Web.UI.HtmlTextWriter |
writer |
|
Overrides
UpdateServerModel(Dictionary<String, Object>)
Updates the server model with client model.
Declaration
public override void UpdateServerModel(Dictionary<string, object> ClientModel)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
ClientModel |
|
Overrides
Events
Select
Declaration
public event ColorPicker.ColorPickerSelectEventHandler Select
Event Type
Implements
System.Web.UI.INamingContainer
System.Web.UI.IPostBackEventHandler
System.Web.UI.IPostBackDataHandler
System.Web.UI.IUrlResolutionService