New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Kendo UI FlatColorPicker component

Definition

Constructors

Initializes a new instance of the FlatColorPicker class.

C#
public FlatColorPicker(ViewContext viewContext, IJavaScriptInitializer initializer, ViewDataDictionary viewData)
Parameters:viewContextViewContext

The view context

initializerIJavaScriptInitializer

The JavaScriptInitializer

viewDataViewDataDictionary

The ViewDataDictionary.

Properties

Specifies whether the UI should be updated while the user is typing in the input field, whenever a valid color can be parsed. If you pass false for this, the widget will update only when ENTER is pressed.

C#
public bool? Autoupdate { get; set; }

Specifies whether the widget should display the Apply / Cancel buttons.

C#
public bool? Buttons { get; set; }

Specifies the template which is used for rendering the action buttons.

C#
public string ButtonsTemplate { get; set; }

The handler for the ButtonsTemplate

C#
public string ButtonsTemplateHandler { get; set; }

The id for the ButtonsTemplate

C#
public string ButtonsTemplateId { get; set; }

Specifies whether the widget should display the 'Clear color' button.

C#
public bool? ClearButton { get; set; }

The number of columns to show in the palette. Also defines the width of the FlatColorPicker.

C#
public double? Columns { get; set; }

Enables the contrast tool in the ColorGradient.

C#
public FlatColorPickerContrastToolSettings ContrastTool { get; set; }

Sets the default input format in the gradient input editor.

C#
public string Format { get; set; }
C#
public IEnumerable<string> Formats { get; set; }

Whether to render the input in ColorGradient component.

C#
public bool? Input { get; set; }

Allows customization of "Apply" / "Cancel" labels.

C#
public FlatColorPickerMessagesSettings Messages { get; set; }

Specifies whether we should display the opacity slider to allow selection of transparency.

C#
public bool? Opacity { get; set; }

Defines the palettes that can be used in the color picker.

C#
public ColorPickerPalette Palette { get; set; }
C#
public IEnumerable<string> PaletteColors { get; set; }

Specifies whether a selected and previous color are displayed for color comparison. with autoupdate set to true both selected and previous colors will be updated.

C#
public bool? Preview { get; set; }

Sets the size of the component.

C#
public ComponentSize? Size { get; set; }

Specifies the initially selected color.

C#
public string Value { get; set; }

The initially selected view in the FlatColorPicker.

C#
public string View { get; set; }
C#
public IEnumerable<string> Views { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Implements: IFormEditor.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

The HtmlTextWriter.

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The TextWriter.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)