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

Kendo UI ColorGradient component

Definition

Constructors

Initializes a new instance of the ColorGradient class.

C#
public ColorGradient(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContext

The view context

initializerIJavaScriptInitializer

The JavaScriptInitializer

urlGeneratorIUrlGenerator

The URL generator.

Properties

Enables the contrast tool in the ColorGradient.

C#
public ColorGradientContrastToolSettings ContrastTool { get; set; }

Defines the format of the gradient input editor

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

Whether to render the input.

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

Allows customization labels and messages in the ColorGradient.

C#
public ColorGradientMessagesSettings Messages { get; set; }

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

C#
public bool? Opacity { 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; }

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)