Class ColorPickerBuilder
Inheritance
System.Object
ColorPickerBuilder
Assembly: Syncfusion.EJ2.dll
public class ColorPickerBuilder : ControlBuilder
Constructors
Declaration
public ColorPickerBuilder()
Declaration
public ColorPickerBuilder(ColorPicker model)
Parameters
Fields
Declaration
Field Value
Properties
Declaration
public IDictionary<string, object> HtmlAttr { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
Declaration
public string ID { get; set; }
Property Value
Type |
Description |
System.String |
|
Declaration
public override TextWriter Output { get; set; }
Property Value
Type |
Description |
System.IO.TextWriter |
|
Overrides
Methods
Triggers before closing the ColorPicker popup.
Declaration
public ColorPickerBuilder BeforeClose(string beforeClose)
Parameters
Type |
Name |
Description |
System.String |
beforeClose |
|
Returns
Triggers before Switching between ColorPicker mode.
Declaration
public ColorPickerBuilder BeforeModeSwitch(string beforeModeSwitch)
Parameters
Type |
Name |
Description |
System.String |
beforeModeSwitch |
|
Returns
Triggers before opening the ColorPicker popup.
Declaration
public ColorPickerBuilder BeforeOpen(string beforeOpen)
Parameters
Type |
Name |
Description |
System.String |
beforeOpen |
|
Returns
Trigger while rendering each palette tile.
Declaration
public ColorPickerBuilder BeforeTileRender(string beforeTileRender)
Parameters
Type |
Name |
Description |
System.String |
beforeTileRender |
|
Returns
Triggers while changing the colors. It will be triggered based on the showButtons property.
If the property is false, the event will be triggered while selecting the colors.
If the property is true, the event will be triggered while apply the selected color.
Declaration
public ColorPickerBuilder Change(string change)
Parameters
Type |
Name |
Description |
System.String |
change |
|
Returns
It is used to render the ColorPicker palette with specified columns.
Declaration
public ColorPickerBuilder Columns(double columns)
Parameters
Type |
Name |
Description |
System.Double |
columns |
|
Returns
Triggers once the component rendering is completed.
Declaration
public ColorPickerBuilder Created(string created)
Parameters
Type |
Name |
Description |
System.String |
created |
|
Returns
Specifies the popup element creation on open.
Declaration
public ColorPickerBuilder CreatePopupOnClick(bool createPopupOnClick = true)
Parameters
Type |
Name |
Description |
System.Boolean |
createPopupOnClick |
|
Returns
This property sets the CSS classes to root element of the ColorPicker
which helps to customize the UI styles.
Declaration
public ColorPickerBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
It is used to enable / disable ColorPicker component. If it is disabled the ColorPicker popup won’t open.
Declaration
public ColorPickerBuilder Disabled(bool disabled = true)
Parameters
Type |
Name |
Description |
System.Boolean |
disabled |
|
Returns
It is used to enable / disable the opacity option of ColorPicker component.
Declaration
public ColorPickerBuilder EnableOpacity(bool enableOpacity = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableOpacity |
|
Returns
To enable or disable persisting component's state between page reloads and it is extended from component class.
Declaration
public ColorPickerBuilder EnablePersistence(bool enablePersistence = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enablePersistence |
|
Returns
Enable or disable rendering component in right to left direction.
Declaration
public ColorPickerBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
Allows additional HTML attributes such as title, name, etc., and
accepts n number of attributes in a key-value pair format.
Declaration
public ColorPickerBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
It is used to render the ColorPicker component as inline.
Declaration
public ColorPickerBuilder Inline(bool inline = true)
Parameters
Type |
Name |
Description |
System.Boolean |
inline |
|
Returns
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public ColorPickerBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
It is used to render the ColorPicker with the specified mode.
Declaration
public ColorPickerBuilder Mode(ColorPickerMode mode)
Parameters
Returns
It is used to show / hide the mode switcher button of ColorPicker component.
Declaration
public ColorPickerBuilder ModeSwitcher(bool modeSwitcher = true)
Parameters
Type |
Name |
Description |
System.Boolean |
modeSwitcher |
|
Returns
It is used to enable / disable the no color option of ColorPicker component.
Declaration
public ColorPickerBuilder NoColor(bool noColor = true)
Parameters
Type |
Name |
Description |
System.Boolean |
noColor |
|
Returns
Triggers after Switching between ColorPicker mode.
Declaration
public ColorPickerBuilder OnModeSwitch(string onModeSwitch)
Parameters
Type |
Name |
Description |
System.String |
onModeSwitch |
|
Returns
Triggers while opening the ColorPicker popup.
Declaration
public ColorPickerBuilder Open(string open)
Parameters
Type |
Name |
Description |
System.String |
open |
|
Returns
It is used to load custom colors to palette.
Declaration
public ColorPickerBuilder PresetColors(object presetColors)
Parameters
Type |
Name |
Description |
System.Object |
presetColors |
|
Returns
Declaration
public HtmlString Render()
Returns
Type |
Description |
Microsoft.AspNetCore.Html.HtmlString |
|
Triggers while selecting the color in picker / palette, when showButtons property is enabled.
Declaration
public ColorPickerBuilder Select(string select)
Parameters
Type |
Name |
Description |
System.String |
select |
|
Returns
It is used to show / hide the control buttons (apply / cancel) of ColorPicker component.
Declaration
public ColorPickerBuilder ShowButtons(bool showButtons = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showButtons |
|
Returns
It is used to set the color value for ColorPicker. It should be specified as Hex code.
Declaration
public ColorPickerBuilder Value(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns