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

Defines the fluent API for configuring the Kendo UI TabStrip

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class TabStripBuilder : WidgetBuilderBase<TabStrip, TabStripBuilder>, IHtmlContent

Inheritance: objectHelperResultWidgetBuilderBase<TabStrip, TabStripBuilder>TabStripBuilder

Implements: IHtmlContent

Inherited Members WidgetBuilderBase<TabStrip, TabStripBuilder>.ToComponent()WidgetBuilderBase<TabStrip, TabStripBuilder>.Expression(string)WidgetBuilderBase<TabStrip, TabStripBuilder>.Explorer(ModelExplorer)WidgetBuilderBase<TabStrip, TabStripBuilder>.Name(string)WidgetBuilderBase<TabStrip, TabStripBuilder>.Deferred(bool)WidgetBuilderBase<TabStrip, TabStripBuilder>.HtmlAttributes(object)WidgetBuilderBase<TabStrip, TabStripBuilder>.HtmlAttributes(IDictionary<string, object>)WidgetBuilderBase<TabStrip, TabStripBuilder>.ScriptAttributes(object, bool)WidgetBuilderBase<TabStrip, TabStripBuilder>.ScriptAttributes(IDictionary<string, object>, bool)WidgetBuilderBase<TabStrip, TabStripBuilder>.Render()WidgetBuilderBase<TabStrip, TabStripBuilder>.ToHtmlString()WidgetBuilderBase<TabStrip, TabStripBuilder>.WriteTo(TextWriter, HtmlEncoder)WidgetBuilderBase<TabStrip, TabStripBuilder>.ToClientTemplate()WidgetBuilderBase<TabStrip, TabStripBuilder>.AsModule(bool)WidgetBuilderBase<TabStrip, TabStripBuilder>.ComponentWidgetBuilderBase<TabStrip, TabStripBuilder>.ContainerHelperResult.WriteTo(TextWriter, HtmlEncoder)HelperResult.WriteActionobject.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 TabStripBuilder class.

C#
public TabStripBuilder(TabStrip component)
Parameters:componentTabStrip

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

Returns the current TabStripBuilder instance.

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

Returns the current TabStripBuilder instance.

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

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

Returns the current TabStripBuilder instance.

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. You can configure the closable behavior for individual tabs by setting the closable option in the specific tab item options.

C#
public TabStripBuilder Closable()
Returns:

TabStripBuilder

Returns the current TabStripBuilder instance.

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. You can configure the closable behavior for individual tabs by setting the closable option in the specific tab item options.

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

The value for Closable

Returns:

TabStripBuilder

Returns the current TabStripBuilder instance.

Specifies whether the TabStrip should be able to collapse completely when clicking an expanded tab.

C#
public TabStripBuilder Collapsible()
Returns:

TabStripBuilder

Returns the current TabStripBuilder instance.

Specifies whether the TabStrip should be able to collapse completely when clicking an expanded tab.

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

The value for Collapsible

Returns:

TabStripBuilder

Returns the current TabStripBuilder instance.

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

Configures the client-side events.

C#
public TabStripBuilder Events(Action<TabStripEventBuilder> configurator)
Parameters:configuratorAction<TabStripEventBuilder>

The client events action.

Returns:

TabStripBuilder

Returns the current TabStripBuilder instance.

Example:
C#
@(Html.Kendo().TabStrip()
.Name("TabStrip")
.Events(events =&gt; events
.Activate("onActivate")
)
)

Select item depending on the current URL.

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

If true the item will be highlighted.

Returns:

TabStripBuilder

Returns the current TabStripBuilder instance.

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

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

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

The value for IconPosition

Returns:

TabStripBuilder

Returns the current TabStripBuilder instance.

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

Returns the current TabStripBuilder instance.

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

Returns the current TabStripBuilder instance.

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

Specifies whether the TabStrip should be keyboard navigatable.

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

The value for Navigatable

Returns:

TabStripBuilder

Returns the current TabStripBuilder instance.

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

If enabled, the TabStrip will display buttons that will scroll the tabs horizontally, when they cannot fit the TabStrip width. By default scrolling is enabled.Unless disabled, scrollable must be set to a JavaScript object, which represents the scrolling configuration.See Scrollable Tabs for more information.

C#
public TabStripBuilder Scrollable(Action<TabStripScrollableSettingsBuilder> configurator)
Parameters:configuratorAction<TabStripScrollableSettingsBuilder>

The TabStripScrollableSettingsBuilder for the scrollable setting.

Returns:

TabStripBuilder

Returns the current instance of TabStripBuilder .

If enabled, the TabStrip will display buttons that will scroll the tabs horizontally, when they cannot fit the TabStrip width. By default scrolling is enabled.Unless disabled, scrollable must be set to a JavaScript object, which represents the scrolling configuration.See Scrollable Tabs for more information.

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

Enables or disables the scrollable option.

Returns:

TabStripBuilder

Returns the current instance of TabStripScrollableSettingsBuilder .

Selects the item at the specified index of the TabStrip.

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

The index.

Returns:

TabStripBuilder

Returns the current TabStripBuilder instance.

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. Default is Medium.

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

The value for Size

Returns:

TabStripBuilder

Returns the current TabStripBuilder instance.

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

Returns the current TabStripBuilder instance.

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

Returns the current TabStripBuilder instance.

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

Returns the current TabStripBuilder instance.

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

The criterion operator type.

C#
public TabStripBuilder TabPosition(TabStripTabPosition value)
Parameters:valueTabStripTabPosition

The value for TabPosition

Returns:

TabStripBuilder

Returns the current TabStripBuilder instance.

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

Specifies the selected tab. Should be corresponding to the dataTextField configuration and used when bound to a DataSource component.

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

The value for Value

Returns:

TabStripBuilder

Returns the current TabStripBuilder instance.

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