Skip to main content

ejColorPicker

Namespace: Wisej.Web.Ext.Syncfusion

Assembly: Wisej.Web.Ext.Syncfusion (4.1.0.0)

The ColorPicker control provides you a rich visual interface for color selection.

public class ejColorPicker : ejBase

You can select the color from the professionally designed palettes or custom color. By clicking a point on the color, you can change the active color to the color that is located under the pointer.

Constructors​

Instance member ejColorPicker()​

Constructs a new instance of the ejColorPicker class.

Example:

The following example creates the color picker and sets the initial color through the options.

var colorPicker = new ejColorPicker();
colorPicker.Options.value = "#278787";
colorPicker.Location = new Point(20, 20);
this.Controls.Add(colorPicker);

Instance member ejColorPicker(options)​

Constructs a new instance of the ejColorPicker class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a color picker that shows the palette and lets the user change the opacity.

var colorPicker = new ejColorPicker(new
{
value = "#ff8000",
modelType = "palette",
enableOpacity = true
});
this.Controls.Add(colorPicker);

Properties​

Instance member Text​

String: Gets or sets the text for the ejColorPicker. (Default: "")

The property reads and writes the value option of the widget, which is the selected color in hexadecimal format prefixed by #, and raises the TextChanged event every time it is assigned. The color selected by the user in the browser is sent back to the server and assigned to this property.

Example:

// select a color.
this.colorPicker1.Text = "#278787";

// use the color selected by the user.
this.colorPicker1.TextChanged += (s, e) =>
{
this.panel1.BackColor = ColorTranslator.FromHtml(this.colorPicker1.Text);
};

Methods​

Protected member OnWebUpdate(state)​

Processes changes between client and server.

ParameterTypeDescription
stateObject

Implements​