ColorPicker
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class ColorPicker : WidgetBase, IWidget, IHtmlAttributesContainer, IScriptableComponent, IFormEditor
Inheritance: objectWidgetBaseColorPicker
Implements:
Inherited Members
Constructors
public ColorPicker(ViewContext viewContext, IJavaScriptInitializer initializer, ViewDataDictionary viewData)
Properties
Specifies the adaptive rendering of the component.
public AdaptiveMode? AdaptiveMode { get; set; }
Allows customization of the subtitle's text in the adaptive view of the component.
public string AdaptiveSubtitle { get; set; }
Allows customization of the title's text in the adaptive view of the component.
public string AdaptiveTitle { get; set; }
Specifies whether the widget should display the Apply / Cancel buttons.
public bool? Buttons { get; set; }
Specifies the template which is used for rendering the action buttons.
public string ButtonsTemplate { get; set; }
The handler for the ButtonsTemplate
public string ButtonsTemplateHandler { get; set; }
The id for the ButtonsTemplate
public string ButtonsTemplateId { get; set; }
Specifies whether the widget should display the 'Clear color' button.
public bool? ClearButton { get; set; }
Specifies whether selection of a color in the palette view closes the popup. Applied only when buttons are set to false and the currently selected view is palette.
public bool? CloseOnSelect { get; set; }
The number of columns to show in the color dropdown when a pallete is specified. This is automatically initialized for the "basic" and "websafe" palettes. If you use a custom palette then you can set this to some value that makes sense for your colors.
public double? Columns { get; set; }
Enables the contrast tool in the ColorGradient.
public ColorPickerContrastToolSettings ContrastTool { get; set; }
Sets a value controlling how the color is applied.
public FillMode? FillMode { get; set; }
Defines the format of the gradient input editor
public ColorPickerFormat? Format { get; set; }
public IEnumerable<string> Formats { get; set; }
Whether to render the input in the ColorGradient component.
public bool? Input { get; set; }
Allows localization of the strings that are used in the widget.
public ColorPickerMessagesSettings Messages { get; set; }
Only for the HSV selector. If true, the widget will display the opacity slider. Note that currently in HTML5 the <input type="color"> does not support opacity.
public bool? Opacity { get; set; }
public ColorPickerPalette Palette { get; set; }
public IEnumerable<string> PaletteColors { get; set; }
Displays the color preview element and the previously selected color for comparison. With buttons set to false, both elements will update at the same time.
public bool? Preview { get; set; }
Sets the size of the component.
public ComponentSize? Size { get; set; }
A CSS class name to display an icon in the color picker button. If specified, the HTML for the element will look like this:
public string ToolIcon { get; set; }
The initially selected color. Note that when initializing the widget from an <input> element, the initial color will be decided by the field instead.
public string Value { get; set; }
Defines the initially selected view in the ColorPicker.
public ColorPickerView? View { get; set; }
public IEnumerable<string> Views { get; set; }
Methods
public override IDictionary<string, object> Serialize()
Overrides:
Implements:
Writes the HTML.
protected override void WriteHtml(HtmlTextWriter writer)
Overrides:
Writes the initialization script.
public override void WriteInitializationScript(TextWriter writer)
The writer.
Overrides: