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

Kendo UI SegmentedControl component

Definition

Constructors

Initializes a new instance of the SegmentedControl class.

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

The view context

initializerIJavaScriptInitializer

The JavaScriptInitializer

urlGeneratorIUrlGenerator

The URL generator.

Properties

Configures whether the SegmentedControl will be enabled or disabled.

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

Configures the different buttons that will be rendered inside the SegmentedControl.

C#
public List<SegmentedControlItem> Items { get; set; }

Sets a value that will shape the layout mode of the SegmentedControl.

C#
public SegmentedButtonLayoutMode? LayoutMode { get; set; }

The selected value of the component. Must match the value of one of the items.

C#
public string SelectedValue { get; set; }

Sets the size of the component.

C#
public ComponentSize? Size { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.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)