ASP.NET Color Picker Documentation - Server side interface

<%@ Register TagPrefix="obout" Namespace="OboutInc.ColorPicker" Assembly="obout_ColorPicker" %>

OboutInc.ColorPicker.ColorPicker's control public properties

Name Description
propertyAutoPostBack Bool. Postback to server on color picked.

See Working example.

Default "false". Optional
propertyCloseButtonImage String. Close button image file path for picker popup.

By default embedded image is used. Optional
See Working example.
propertyCloseButtonOverImage String. Close button over image file path for picker popup.

By default embedded image is used. Optional
See Working example.
propertyCloseButtonPressedImage String. Close button pressed image file path for picker popup.

By default embedded image is used. Optional
See Working example.
propertyCustomColors Collection of OboutInc.ColorPicker.CustomColor objects.

See OboutInc.ColorPicker.CustomColor.
propertyCustomColorsInLine Int. The number of custom colors in a line.

See Working example.

By default the number of custom colors in a line depends on picker popup width. Optional
propertyCustomColorsOnly Bool. Show or not the default palettes in popup.
If set to "true", the picker will contain custom colors (if defined) only.

See Working example.

Default "false". Optional
propertyHexView Bool. Whether 'Hex preview' textbox is present in the picker popup.
If set to "false", the textbox will not be shown in the popup.

See Working example.

Default "true". Optional
propertyHorizontalPosition OboutInc.ColorPicker.HorizontalPositionType enumeration.
Horizontal position of picker popup according to target control.
See description of OboutInc.ColorPicker.HorizontalPositionType enumeration below.

Default right. Optional
propertyID String. Component ID.

Optional
propertyInitialColor String. Initial color for control's popup.
This string should have #RRGGBB format.

Default #000000. Optional
propertyOffsetLeft Int. Additional left offset of positioned picker popup in pixels.

Default 0. Optional
propertyOffsetTop Int. Additional top offset of positioned picker popup in pixels.

Default 0. Optional
propertyOnClientCancel String. Name of client-side function executed on picker popup canceled.
This function should have one parameter:
    sender - client side ColorPicker object.

See Client side interface.

By default no function is called. Optional
propertyOnClientOpen String. Name of client-side function executed on picker popup opened.
This function should have one parameter:
    sender - client side ColorPicker object.

See Client side interface and Working example.

By default no function is called. Optional
propertyOnClientPicked String. Name of client-side function executed on color pick before popup closed.
This function should have one parameter:
    sender - client side ColorPicker object.

See Client side interface and Working example.

By default no function is called. Optional
propertyPickButton Bool. Show or not the pick button in popup.
If set to "false", color will be picked on mouse click in any palette or "Enter" key pressed.

See Working example.

Default "true". Optional
propertyPickerCallerImage String. Picker caller image file path. This image is used when control has no child control(s).

By default embedded image is used. Optional
propertySaveButtonImage String. 'Save' button image file path for picker popup.

By default embedded image is used. Optional
See Working example.
propertySaveButtonOverImage String. 'Save' button over image file path for picker popup.

By default embedded image is used. Optional
See Working example.
propertySaveButtonPressedImage String. 'Save' button pressed image file path for picker popup.

By default embedded image is used. Optional
See Working example.
propertySetColorImage String. 'Set color' button image file path for picker popup.

By default embedded image is used. Optional
See Working example.
propertySetColorOverImage String. 'Set color' button over image file path for picker popup.

By default embedded image is used. Optional
See Working example.
propertySetColorPressedImage String. 'Set color' button pressed image file path for picker popup.

By default embedded image is used. Optional
See Working example.
propertyStyleFile String. Style file path.

By default embedded file is used. See Custom style file.
Optional
propertyTargetId String. The target control Id attached to the Picker.

Optional
propertyTargetProperty String. The target control client-side property to be changed on color pick.

Default "value". Optional
propertyTitle String. The title of popup window.

Default "Color Picker". Optional
See Working example.
propertyVerticalPosition OboutInc.ColorPicker.VerticalPositionType enumeration.
Vertical position of picker popup according to target control.
See description of OboutInc.ColorPicker.VerticalPositionType enumeration below.

Default bottom. Optional
propertyWidth Int. Width of picker popup in pixels.

See Working example.

By default the width is defined by ColorPicker_MainDiv CSS class, see Custom style file. Optional

OboutInc.ColorPicker public enumerations

Enumerations Description
OboutInc.ColorPicker.VerticalPositionType Members:

top- Popup is positioned above target control
middle- Popup is positioned on target control middle
bottom- Popup is positioned under target control
OboutInc.ColorPicker.HorizontalPositionType Members:

left - Popup is positioned left according to right border of target control
center - Popup is positioned on target control center
right - Popup is positioned right according to left border of target control

OboutInc.ColorPicker.ColorPicker events

Events Description
propertyColorPostBack OboutInc.ColorPicker.ColorPostBackEventHandler event.
This event is raised when ColorPicker's AutoPostBack property is set to "true".

C# code sample.

using OboutInc.ColorPicker;
...
picker.ColorPostBack +=new ColorPostBackEventHandler(OnCPB);
...
private void OnCPB(object sender, ColorPostBackEventArgs e)
{
   ...
}

See also working example.
OboutInc.ColorPicker.ColorPostBackEventArgs Members:

Color - Posted color
PreviousColor - Previous value of color

OboutInc.ColorPicker.CustomColor public properties

Name Description
propertyValue String. Value of color in #RRGGBB format or TRANSPARENT.
propertyTitle String. Title. If not set, the Value is used as title.

OboutInc.ColorPicker.CustomColors's control public properties

Name Description
propertyCollection Collection of OboutInc.ColorPicker.CustomColor objects.

See Custom colors and Custom colors only working examples.
propertyPickerId String. ID of ColorPicker control.
If PickerId is not set, this control should have ColorPicker control as parent.

See Custom colors and Custom colors only working examples.