ColorPicker
Kendo UI ColorPicker component
Definition
Namespace:Kendo.Mvc.UI
Assembly:Kendo.Mvc.dll
Syntax:
public class ColorPicker : WidgetBase, IHtmlAttributesContainer, IFormEditor
Inheritance: objectWidgetBaseColorPicker
Implements:
Inherited Members
Constructors
Initializes a new instance of the ColorPicker class.
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 that returns the template used for ButtonsTemplate
public string ButtonsTemplateHandler { get; set; }
The id of the script element used for 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; }
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; }
Formats member.
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; }
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; }
Defines the palettes that can be used in the color picker.
public ColorPickerPalette? Palette { get; set; }
PaletteColors member.
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; }
The size of a color cell.
public ColorPickerTileSizeSettings TileSize { get; }
A CSS class name to display an icon in the color picker button. If specified, the HTML for the element will look like this:Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.
public ColorPickerToolIconSettings ToolIconSettings { get; }
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; }
Views member.
public IEnumerable<string> Views { get; set; }
Methods
GetElement method.
Serializes the component settings to a dictionary.
public override IDictionary<string, object> Serialize()
A dictionary of settings.
Overrides:
Implements:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML content.
protected override void WriteHtml(TextWriter writer)
The text writer.
Overrides:
WriteInitializationScript method.
public override void WriteInitializationScript(TextWriter writer)
Overrides: