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

Defines the fluent API for configuring the Kendo SegmentedControl for ASP.NET MVC.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class SegmentedControlBuilder : WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>, IHtmlString

Inheritance: objectWidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>SegmentedControlBuilder

Implements: IHtmlString

Inherited Members WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.ToComponent()WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.Name(string)WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.Deferred(bool)WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.ModelMetadata(ModelMetadata)WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.HtmlAttributes(object)WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.AsModule(bool)WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.Render()WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.ToHtmlString()WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.ToClientTemplate()WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.ToString()WidgetBuilderBase<SegmentedControl, SegmentedControlBuilder>.Componentobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the SegmentedControl class.

C#
public SegmentedControlBuilder(SegmentedControl component)
Parameters:componentSegmentedControl

The component.

Methods

Configures whether the SegmentedControl will be enabled or disabled.

C#
public SegmentedControlBuilder Enabled(bool value)
Parameters:valuebool

The value that configures the enabled.

Returns:

SegmentedControlBuilder

Configures the client-side events.

C#
public SegmentedControlBuilder Events(Action<SegmentedControlEventBuilder> configurator)
Parameters:configuratorAction<SegmentedControlEventBuilder>

The client events action.

Returns:

SegmentedControlBuilder

Example:
C#
@(Html.Kendo().SegmentedControl()
.Name("SegmentedControl")
.Events(events =&gt; events
.Change("onChange")
)
)

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

C#
public SegmentedControlBuilder Items(Action<SegmentedControlItemFactory> configurator)
Parameters:configuratorAction<SegmentedControlItemFactory>

The action that configures the items.

Returns:

SegmentedControlBuilder

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

C#
public SegmentedControlBuilder LayoutMode(SegmentedButtonLayoutMode value)
Parameters:valueSegmentedButtonLayoutMode

The value that configures the layoutmode.

Returns:

SegmentedControlBuilder

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

C#
public SegmentedControlBuilder SelectedValue(string value)
Parameters:valuestring

The value that configures the selectedvalue.

Returns:

SegmentedControlBuilder

Sets the size of the component.

C#
public SegmentedControlBuilder Size(ComponentSize value)
Parameters:valueComponentSize

The value that configures the size.

Returns:

SegmentedControlBuilder