The ColorPicker control represents a text-box control with the ability to parse and select colors from a popup preset.
Use the ColorPicker.Value property to get or set the control's current color.
The ColorPicker control supports three different types of palette color presets as specified in the ColorPreset enumeration.
The position of the popup preset can be adjusted by using the PopupAlignRight and PopupAlignTop properties.
The following events are exposed by the ColorPicker class.
Event | Event arguments | Description |
---|---|---|
ValueChangedEventArgs<Color> | Raised when the control's value has changed |
You can access the control on the client side by its ClientID.
JavaScript
![]() |
---|
var colorPicker = $find("ColorPicker1"); |
Use the get_value and set_value methods to get or set the control's color.
JavaScript
![]() |
---|
colorPicker.set_value("#FF0000"); |
The following client-side event are exposed by the ColorPicker class.
Event | Event arguments | Script property | Description |
---|---|---|---|
Raised when a control value has changed. | |||
- | Raised just after the control has finished loading and is ready for interaction. | ||
Raised when the control's popup is opened. | |||
Raised when the control's popup is closed. | |||
Raised when the control's popup is about to be opened. | |||
Raised when the control's popup is about to be closed. |