ColorPickerBuilder
Defines the fluent API for configuring the Kendo UI ColorPicker
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class ColorPickerBuilder : MvvmWidgetBuilderBase<ColorPicker, ColorPickerBuilder>, IHtmlContent
Inheritance: objectHelperResultWidgetBuilderBase<ColorPicker, ColorPickerBuilder>MvvmWidgetBuilderBase<ColorPicker, ColorPickerBuilder>ColorPickerBuilder
Implements:
Inherited Members
Constructors
Initializes a new instance of the ColorPickerBuilder class.
Methods
Specifies the adaptive rendering of the component.
public ColorPickerBuilder AdaptiveMode(AdaptiveMode value)
The value for AdaptiveMode
Returns:Returns the current ColorPickerBuilder instance.
Allows customization of the subtitle's text in the adaptive view of the component.
public ColorPickerBuilder AdaptiveSubtitle(string value)
The value for AdaptiveSubtitle
Returns:Returns the current ColorPickerBuilder instance.
Allows customization of the title's text in the adaptive view of the component.
public ColorPickerBuilder AdaptiveTitle(string value)
The value for AdaptiveTitle
Returns:Returns the current ColorPickerBuilder instance.
Specifies whether the widget should display the Apply / Cancel buttons.
public ColorPickerBuilder Buttons(bool value)
The value for Buttons
Returns:Returns the current ColorPickerBuilder instance.
Specifies the template which is used for rendering the action buttons.
public ColorPickerBuilder ButtonsTemplate(string value)
The value for ButtonsTemplate
Returns:Returns the current ColorPickerBuilder instance.
Specifies the template which is used for rendering the action buttons.
public ColorPickerBuilder ButtonsTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the buttonstemplate.
Returns:Returns the current ColorPickerBuilder instance.
Specifies the template which is used for rendering the action buttons.
public ColorPickerBuilder ButtonsTemplateHandler(string templateHandler)
The handler that returs the template for ButtonsTemplate
Returns:Returns the current ColorPickerBuilder instance.
Specifies the template which is used for rendering the action buttons.
public ColorPickerBuilder ButtonsTemplateId(string templateId)
The ID of the template element for ButtonsTemplate
Returns:Returns the current ColorPickerBuilder instance.
Specifies the template which is used for rendering the action buttons.
public ColorPickerBuilder ButtonsTemplateView(IHtmlContent templateView)
The view that contains the template for ButtonsTemplate
Returns:Returns the current ColorPickerBuilder instance.
Specifies whether the widget should display the 'Clear color' button.
public ColorPickerBuilder ClearButton()
Returns the current ColorPickerBuilder instance.
Specifies whether the widget should display the 'Clear color' button.
public ColorPickerBuilder ClearButton(bool value)
The value for ClearButton
Returns:Returns the current ColorPickerBuilder instance.
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 ColorPickerBuilder CloseOnSelect()
Returns the current ColorPickerBuilder instance.
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 ColorPickerBuilder CloseOnSelect(bool value)
The value for CloseOnSelect
Returns:Returns the current ColorPickerBuilder instance.
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 ColorPickerBuilder Columns(double value)
The value for Columns
Returns:Returns the current ColorPickerBuilder instance.
Enables the contrast tool in the ColorGradient.
public ColorPickerBuilder ContrastTool()
Returns the current instance of ColorPickerContrastToolSettingsBuilder .
Enables the contrast tool in the ColorGradient.
public ColorPickerBuilder ContrastTool(Action<ColorPickerContrastToolSettingsBuilder> configurator)
The ColorPickerContrastToolSettingsBuilder for the contrasttool setting.
Returns:Returns the current instance of ColorPickerBuilder .
Enables the contrast tool in the ColorGradient.
public ColorPickerBuilder ContrastTool(bool enabled)
Enables or disables the contrasttool option.
Returns:Returns the current instance of ColorPickerContrastToolSettingsBuilder .
Enables or disables the picker.
public ColorPickerBuilder Enable(bool value)
Whether the picker is enabled
Returns:Returns the current instance of ColorPickerBuilder for method chaining.
Configures the client-side events.
public ColorPickerBuilder Events(Action<ColorPickerEventBuilder> configurator)
The client events action.
Returns:Returns the current ColorPickerBuilder instance.
Sets a value controlling how the color is applied.
public ColorPickerBuilder FillMode(FillMode value)
The value for FillMode
Returns:Returns the current ColorPickerBuilder instance.
Defines the format of the gradient input editor.
public ColorPickerBuilder Format(ColorPickerFormat value)
The value for Format
Returns:Returns the current ColorPickerBuilder instance.
Sets the available input formats in the gradient input editor.
public ColorPickerBuilder Formats(params string[] formats)
Only "hex" and "rgb" are valid values.
Returns:Returns the current instance of ColorPickerBuilder for method chaining.
Whether to render the input in the ColorGradient component.
public ColorPickerBuilder Input(bool value)
The value for Input
Returns:Returns the current ColorPickerBuilder instance.
Allows localization of the strings that are used in the widget.
public ColorPickerBuilder Messages(Action<ColorPickerMessagesSettingsBuilder> configurator)
The ColorPickerMessagesSettingsBuilder for the messages setting.
Returns:Returns the current instance of ColorPickerBuilder .
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.
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 ColorPickerBuilder Opacity(bool value)
The value for Opacity
Returns:Returns the current ColorPickerBuilder instance.
Defines the palettes that can be used in the color picker.
public ColorPickerBuilder Palette(ColorPickerPalette value)
The value for Palette
Returns:Returns the current ColorPickerBuilder instance.
Sets the range of colors that the user can pick from.
public ColorPickerBuilder Palette(params string[] palette)
A list of colors.
Returns:Returns the current instance of ColorPickerBuilder for method chaining.
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 ColorPickerBuilder Preview(bool value)
The value for Preview
Returns:Returns the current ColorPickerBuilder instance.
Sets a value controlling the border radius.
public ColorPickerBuilder Rounded(Rounded value)
The value for Rounded
Returns:Returns the current ColorPickerBuilder instance.
Sets the size of the component.
public ColorPickerBuilder Size(ComponentSize value)
The value for Size
Returns:Returns the current ColorPickerBuilder instance.
The size of a color cell.
public ColorPickerBuilder TileSize(Action<ColorPickerTileSizeSettingsBuilder> configurator)
The ColorPickerTileSizeSettingsBuilder for the tilesize setting.
Returns:Returns the current instance of ColorPickerBuilder .
Sets the size of the palette tiles
public ColorPickerBuilder TileSize(int tileSize)
The tile size (for square tiles)
Returns:Returns the current instance of ColorPickerBuilder for method chaining.
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 ColorPickerBuilder ToolIcon(Action<ColorPickerToolIconSettingsBuilder> configurator)
The ColorPickerToolIconSettingsBuilder for the toolicon setting.
Returns:Returns the current instance of ColorPickerBuilder .
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 ColorPickerBuilder ToolIcon(string toolIcon)
The value for ToolIcon
Returns:Returns the current instance of ColorPickerBuilder .
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 ColorPickerBuilder Value(string value)
The value for Value
Returns:Returns the current ColorPickerBuilder instance.
Defines the initially selected view in the ColorPicker.
public ColorPickerBuilder View(ColorPickerView value)
The value for View
Returns:Returns the current ColorPickerBuilder instance.
Sets the available views in the ColorPicker.
public ColorPickerBuilder Views(params string[] views)
Valid values are "gradient" and "palette".
Returns:Returns the current instance of ColorPickerBuilder for method chaining.