Views
The Views()
configuration allows you to choose between the Gradient
and Palette
views. Also, you can specify the initially selected view through the View()
option.
The
Views()
configuration was introduced with the R3 2021 SP1 release.
The following example shows how to enable the available ColorPicker views and define a default view that will be displayed when the component opens.
@(Html.Kendo().ColorPicker()
.Name("PatetteColorPicker")
.Preview(false)
.View(ColorPickerView.Palette)
.Views(new string[]{ "gradient", "palette" })
)
@(Html.Kendo().ColorPicker()
.Name("GradientColorPicker")
.Preview(false)
.View(ColorPickerView.Gradient)
.Views(new string[]{ "gradient", "palette" })
)