Class ColorPickerPropertiesBuilder
Represents the ColorPicker Properties.
Inheritance
System.Object
ColorPickerPropertiesBuilder
Implements
System.Web.IHtmlString
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Syncfusion.EJ.dll
Syntax
public class ColorPickerPropertiesBuilder : IPropertiesBuilder, IHtmlString
Constructors
ColorPickerPropertiesBuilder()
Declaration
public ColorPickerPropertiesBuilder()
ColorPickerPropertiesBuilder(ColorPicker)
Declaration
public ColorPickerPropertiesBuilder(ColorPicker colorPicker)
Parameters
Fields
colorPicker
Declaration
public ColorPicker colorPicker
Field Value
Methods
Specifies the mode of the color picker button. Mode can be 'dropdown' or 'split' button.
Declaration
public ColorPickerPropertiesBuilder ButtonMode(ButtonMode buttonMode)
Parameters
Returns
ClientSideEvents(Action<ColorPickerClientSideEventsBuilder>)
Specifies to trigger the color picker client side events.
Declaration
public ColorPickerPropertiesBuilder ClientSideEvents(Action<ColorPickerClientSideEventsBuilder> clientSideEvents)
Parameters
Returns
ColorPickerButtonText(Action<ColorPickerButtonTextBuilder>)
Specifies to customize the 'Apply', 'Cancel', 'Swatches' button text in the color picker popup.
Declaration
public ColorPickerPropertiesBuilder ColorPickerButtonText(Action<ColorPickerButtonTextBuilder> buttonText)
Parameters
Returns
ColorPickerTooltipText(Action<ColorPickerTooltipTextBuilder>)
Specifies to customize tooltip text for each button in swatches, add button, last selected color and current color element.
Declaration
public ColorPickerPropertiesBuilder ColorPickerTooltipText(Action<ColorPickerTooltipTextBuilder> tooltipText)
Parameters
Returns
Columns(Int32)
Specifies the number of columns to display the colors in the color palette.
Declaration
public ColorPickerPropertiesBuilder Columns(int columns)
Parameters
Type |
Name |
Description |
System.Int32 |
columns |
|
Returns
CssClass(String)
Specifies the root CSS class to color picker for theme customization with specified string argument.
Declaration
public ColorPickerPropertiesBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
Custom(List<String>)
Specifies 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 ColorPickerPropertiesBuilder Custom(List<string> custom)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.String> |
custom |
|
Returns
DisplayInline()
Specifies to display the colorpicker popup always in visible state.
Declaration
public ColorPickerPropertiesBuilder DisplayInline()
Returns
DisplayInline(Boolean)
Specifies to display the colorpicker popup always in visible state with specified argument.
Declaration
public ColorPickerPropertiesBuilder DisplayInline(bool displayInline)
Parameters
Type |
Name |
Description |
System.Boolean |
displayInline |
|
Returns
Enabled()
Allows the color picker to respond for user interaction.
Declaration
public ColorPickerPropertiesBuilder Enabled()
Returns
Enabled(Boolean)
Allows the color picker to respond for user interaction with specified boolean argument.
Declaration
public ColorPickerPropertiesBuilder Enabled(bool enabled)
Parameters
Type |
Name |
Description |
System.Boolean |
enabled |
|
Returns
EnableOpacity()
Shows the opacity slider in the color picker popup.
Declaration
public ColorPickerPropertiesBuilder EnableOpacity()
Returns
EnableOpacity(Boolean)
Shows the opacity slider in the color picker popup with specified argument.
Declaration
public ColorPickerPropertiesBuilder EnableOpacity(bool enableOpacity)
Parameters
Type |
Name |
Description |
System.Boolean |
enableOpacity |
|
Returns
HtmlAttributes(IDictionary<String, Object>)
Specifies to map the field of HTML attributes.
Declaration
public ColorPickerPropertiesBuilder HtmlAttributes(IDictionary<string, object> itemHtmlAttributes)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
itemHtmlAttributes |
|
Returns
Locale(String)
Localize the color picker to the specified language.
Declaration
public ColorPickerPropertiesBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
ModelType(ModelType)
Specifies the model type of the color picker popup. Model type can be 'picker' or 'palette'.
Declaration
public ColorPickerPropertiesBuilder ModelType(ModelType modelType)
Parameters
Returns
OpacityValue(Int32)
Specifies the opacity value of the selected color.
Declaration
public ColorPickerPropertiesBuilder OpacityValue(int opacityValue)
Parameters
Type |
Name |
Description |
System.Int32 |
opacityValue |
|
Returns
Palette(PaletteType)
Specifies 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 ColorPickerPropertiesBuilder Palette(PaletteType palette)
Parameters
Returns
PresetType(PresetsType)
Specifies 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 ColorPickerPropertiesBuilder PresetType(PresetsType presetType)
Parameters
Returns
Render()
Renders the color picker instance.
Declaration
ShowApplyCancel()
Shows the 'Apply' and 'Cancel' buttons in the color picker popup.
Declaration
public ColorPickerPropertiesBuilder ShowApplyCancel()
Returns
ShowApplyCancel(Boolean)
Shows or hides the 'Apply' and 'Cancel' buttons in the color picker popup based on the argument specified.
Declaration
public ColorPickerPropertiesBuilder ShowApplyCancel(bool showApplyCancel)
Parameters
Type |
Name |
Description |
System.Boolean |
showApplyCancel |
|
Returns
Shows the clear button in rgba field of the color picker popup.
Declaration
public ColorPickerPropertiesBuilder ShowClearButton()
Returns
Shows or hides the clear button in rgba field of the color picker popup based on specified argument.
Declaration
public ColorPickerPropertiesBuilder ShowClearButton(bool showClearButton)
Parameters
Type |
Name |
Description |
System.Boolean |
showClearButton |
|
Returns
ShowPreview()
Specifies to provide the live preview support for current cursor selection color and selected color.
Declaration
public ColorPickerPropertiesBuilder ShowPreview()
Returns
ShowPreview(Boolean)
Specifies to provide the live preview support for current cursor selection color and selected color with specified argument.
Declaration
public ColorPickerPropertiesBuilder ShowPreview(bool showPreview)
Parameters
Type |
Name |
Description |
System.Boolean |
showPreview |
|
Returns
ShowRecentColors()
Shows the recent colors in the custom list of color picker popup.
Declaration
public ColorPickerPropertiesBuilder ShowRecentColors()
Returns
ShowRecentColors(Boolean)
Shows the recent colors in the custom list of color picker popup with specified argument.
Declaration
public ColorPickerPropertiesBuilder ShowRecentColors(bool showRecentColors)
Parameters
Type |
Name |
Description |
System.Boolean |
showRecentColors |
|
Returns
ShowSwitcher()
Shows the switcher button in the colorpicker popup.
Declaration
public ColorPickerPropertiesBuilder ShowSwitcher()
Returns
ShowSwitcher(Boolean)
Shows or hides the switcher button in the color picker popup based on specified argument.
Declaration
public ColorPickerPropertiesBuilder ShowSwitcher(bool showSwitcher)
Parameters
Type |
Name |
Description |
System.Boolean |
showSwitcher |
|
Returns
Shows tooltip to notify the slider value in the color picker.
Declaration
public ColorPickerPropertiesBuilder ShowTooltip()
Returns
Shows tooltip to notify the slider value in the color picker with the specified argument.
Declaration
public ColorPickerPropertiesBuilder ShowTooltip(bool showTooltip)
Parameters
Type |
Name |
Description |
System.Boolean |
showTooltip |
|
Returns
TagName(String)
Specifies the tag name 'div' to display the color picker in inline mode without color picker button. This depends on boolean value of "DisplayInline".
Declaration
public ColorPickerPropertiesBuilder TagName(string tagName)
Parameters
Type |
Name |
Description |
System.String |
tagName |
|
Returns
ToHtmlString()
Declaration
public string ToHtmlString()
Returns
Type |
Description |
System.String |
|
Specifies the tool icon to be displayed in dropdown control color area.
Declaration
public ColorPickerPropertiesBuilder ToolIcon(string toolIcon)
Parameters
Type |
Name |
Description |
System.String |
toolIcon |
|
Returns
Value(String)
Specifies the color value in hexadecimal prefixed with '#' to select the color.
Declaration
public ColorPickerPropertiesBuilder Value(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
Implements
System.Web.IHtmlString