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

Defines the fluent interface for configuring the TabStrip component.

Definition

Constructors

Initializes a new instance of the TabStripBuilder class.

C#
public TabStripBuilder(TabStrip component)
Parameters:componentTabStrip

The component.

Methods

Configures the animation effects of the tabstrip.

C#
public TabStripBuilder Animation(Action<PopupAnimationBuilder> animationAction)
Parameters:animationActionAction<PopupAnimationBuilder>

The action that configures the animation.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("PanelBar")
.Animation(animation =&gt; animation.Open(config =&gt; config.Fade(FadeDirection.In)))
)

Configures the animation effects of the TabStrip.

C#
public TabStripBuilder Animation(bool enable)
Parameters:enablebool

Whether the component animation is enabled.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("PanelBar")
.Animation(false)
)

Binds the TabStrip to a sitemap

C#
public TabStripBuilder BindTo(string viewDataKey, Action<TabStripItem, SiteMapNode> siteMapAction)
Parameters:viewDataKeystring

The view data key.

siteMapActionAction<TabStripItem, SiteMapNode>

The action to configure the item.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.BindTo("examples", (item, siteMapNode) =&gt;
{
})
)

Binds the TabStrip to a sitemap.

C#
public TabStripBuilder BindTo(string viewDataKey)
Parameters:viewDataKeystring

The view data key.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.BindTo("examples")
)

Binds the TabStrip to a list of objects.

C#
public TabStripBuilder BindTo<T>(IEnumerable<T> dataSource, Action<TabStripItem, T> itemDataBound)
Parameters:dataSourceIEnumerable<T>

The data source.

itemDataBoundAction<TabStripItem, T>

The action executed for every data bound item.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.BindTo(new []{"First", "Second"}, (item, value) =&gt;
{
item.Text = value;
})
)

Specifies whether each tab can be closed via a close button. When enabled, each tab includes a close icon that triggers tab removal on click. This applies to all tabs in the TabStrip. In case you want to have specific tabs with a different closable behavior, you can set the closable option in the specific tab item options.

C#
public TabStripBuilder Closable()
Returns:

TabStripBuilder

Specifies whether each tab can be closed via a close button. When enabled, each tab includes a close icon that triggers tab removal on click. This applies to all tabs in the TabStrip. In case you want to have specific tabs with a different closable behavior, you can set the closable option in the specific tab item options.

C#
public TabStripBuilder Closable(bool value)
Parameters:valuebool

The value for Closable

Returns:

TabStripBuilder

Configures the collapsible property of the TabStrip.

C#
public TabStripBuilder Collapsible(bool enable)
Parameters:enablebool

Whether the component animation is collapsible.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("PanelBar")
.Collapsible(false)
)

Configures the client-side events of the TabStrip.

C#
public TabStripBuilder Events(Action<TabStripEventBuilder> clientEventsAction)
Parameters:clientEventsActionAction<TabStripEventBuilder>

The client events action.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.Events(events =&gt;
events.Select("onSelect").OnLoad("onLoad")
)
)

Select item depending on the current URL.

C#
public TabStripBuilder HighlightPath(bool value)
Parameters:valuebool

If true the item will be highlighted.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.HighlightPath(true)
)

Specifies the position of the icon in the Menu items using the text content as a reference.

C#
public TabStripBuilder IconPosition(IconPosition value)
Parameters:valueIconPosition

The value for IconPosition

Returns:

TabStripBuilder

Callback for each item of the TabStrip.

C#
public TabStripBuilder ItemAction(Action<TabStripItem> action)
Parameters:actionAction<TabStripItem>

Action, which will be executed for each item.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.ItemAction(item =&gt;
{
item
.Text(...)
.HtmlAttributes(...);
})
)

Defines the items in the TabStrip.

C#
public TabStripBuilder Items(Action<TabStripItemFactory> addAction)
Parameters:addActionAction<TabStripItemFactory>

The add action.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.Items(items =&gt;
{
items.Add().Text("First Item");
items.Add().Text("Second Item");
})
)

Enable/disable TabStrip keyboard navigation.

C#
public TabStripBuilder Navigatable(bool value)
Parameters:valuebool

If true the TabStrip will have keyboard navigation.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.Navigatable(false)
)

Sets the tab scrolling settings.

C#
public TabStripBuilder Scrollable(Action<TabStripScrollableSettingsBuilder> scrollableSettingsAction)
Parameters:scrollableSettingsActionAction<TabStripScrollableSettingsBuilder>

The action which accepts scrollable settings.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.Items(items =&gt;
{
items.Add().Text("First Item");
items.Add().Text("Second Item");
})
.Scrollable(s =&gt; s.Enabled(true).Distance(300))
)

Disables tab scrolling.

C#
public TabStripBuilder Scrollable(bool enabled)
Parameters:enabledbool

Boolean flag.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.Items(items =&gt;
{
items.Add().Text("First Item");
items.Add().Text("Second Item");
})
.Scrollable(false)
)

Enable/disable security trimming functionality of the TabStrip.

C#
public TabStripBuilder SecurityTrimming(bool value)
Parameters:valuebool

If true security trimming is enabled.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.SecurityTrimming(false)
)

Selects the item at the specified index.

C#
public TabStripBuilder SelectedIndex(int index)
Parameters:indexint

The index.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.Items(items =&gt;
{
items.Add().Text("First Item");
items.Add().Text("Second Item");
})
.SelectedIndex(1)
)

Specifies the size of the component tabs. Default is Medium.

C#
public TabStripBuilder Size(ComponentSize? value)
Parameters:valueComponentSize?

The value for Size

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.Items(items =&gt;
{
items.Add().Text("First Item");
items.Add().Text("Second Item");
})
.Size(Size.Small)
)

If enabled, users will be able to sort the tabs by dragging them to the desired position.

C#
public TabStripBuilder Sortable()
Returns:

TabStripBuilder

Example:
C#
@(Html.Kendo().TabStrip()
.Name("TabStrip")
.Items(items =&gt;
{
items.Add().Text("First Item");
items.Add().Text("Second Item");
})
.Sortable(true)
)

If enabled, users will be able to sort the tabs by dragging them to the desired position.

C#
public TabStripBuilder Sortable(bool value)
Parameters:valuebool

The value for Sortable

Returns:

TabStripBuilder

Example:
C#
@(Html.Kendo().TabStrip()
.Name("TabStrip")
.Items(items =&gt;
{
items.Add().Text("First Item");
items.Add().Text("Second Item");
})
.Sortable(true)
)

Specifies the alignment of the component tabs. Default is Start. Not applicable with Scrollable TabStrip.

C#
public TabStripBuilder TabAlignment(TabStripTabAlignment value)
Parameters:valueTabStripTabAlignment

The value for TabAlignment

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.Items(items =&gt;
{
items.Add().Text("First Item");
items.Add().Text("Second Item");
})
.TabAlignment(TabStripTabAlignment.Left)
)

Sets the tabs' position. The default value is Top. Using fade animation is highly recommended with any of the non-default tab position settings.

C#
public TabStripBuilder TabPosition(TabStripTabPosition position)
Parameters:positionTabStripTabPosition

The position.

Returns:

TabStripBuilder

Example:
C#
@( Html.Kendo().TabStrip()
.Name("TabStrip")
.Items(items =&gt;
{
items.Add().Text("First Item");
items.Add().Text("Second Item");
})
.TabPosition(TabPosition.Left)
)

Sets the selected tab of the widget

C#
public TabStripBuilder Value(string value)
Parameters:valuestring

String value corresponding to DataTextField property

Returns:

TabStripBuilder

Example:
C#
@(Html.Kendo().TabStrip()
.Name("TabStrip")
.Items(items =&gt;
{
items.Add().Text("First Item");
items.Add().Text("Second Item");
})
.Value("Test")
)