TabStripItemBuilder

Properties

ViewContext - ViewContext

Methods

Type(Kendo.Mvc.UI.HttpVerbs)

Specifies the HTTP verb of the request.

Parameters

verb - HttpVerbs

The HTTP verb

Headers(System.Object)

Specifies the HTTP headers.

Parameters

headers - System.Object

Headers(System.Collections.Generic.IDictionary)

Specifies the HTTP headers.

Parameters

headers - System.Collections.Generic.IDictionary<String,String>

Data(System.Func)

Sets a JavaScript function which will return additional parameters to be sent the server.

Parameters

handler - System.Func<Object,Object>

Data(System.String)

Sets a JavaScript function which will return additional parameters to be sent to the server.

Parameters

handler - System.String

JavaScript function name

Icon(System.String)

Defines the name for an existing icon in a Kendo UI theme or SVG content. The icon is rendered inside the tab element.See web icons help article for more details on Kendo UI icons.

Parameters

value - System.String

The value for Icon

Example

Razor
 
             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .Items(items =>
                        {
                            items.Add().Text("First Item").Icon("gear");
                        })
             )
             

IconClass(System.String)

If set, this value will be appended to the icon element's class attribute.

Parameters

value - System.String

The value for IconClass

Example

Razor
 
             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .Items(items =>
                        {
                            items.Add().Text("First Item").IconClass("test");
                        })
             )
             

IconPosition(Kendo.Mvc.UI.IconPosition)

Sets the position of the icon relative to the tab text.

Parameters

value - IconPosition

The value that sets the icon position.

Example

Razor
 
             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .Items(items =>
                        {
                            items.Add()
                                .Text("First Item")
                                .IconPosition(IconPosition.After);
                        })
             )
             

Closable(System.Boolean)

Specifies whether this specific tab can be closed via a close button. When set to true, the tab includes a close icon that triggers tab removal when clicked. This overrides the global closable setting for this specific tab.

Parameters

value - System.Boolean

The value for Closable

Example

Razor
 
             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .Items(items =>
                        {
                            items.Add()
                                .Text("First Item")
                                .Closable(true);
                        })
             )
             

Closable()

Specifies whether this specific tab can be closed via a close button. When set to true, the tab includes a close icon that triggers tab removal when clicked. This overrides the global closable setting for this specific tab.

Example

Razor
 
             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .Items(items =>
                        {
                            items.Add()
                                .Text("First Item")
                                .Closable(true);
                        })
             )
             

Actions(System.Action)

Defines a collection of action buttons that are rendered in the tab. The actions buttons are rendered as part of the tab and can be used to provide additional functionality beyond the built-in close button.

Parameters

configurator - System.Action<TabStripItemActionFactory>

The configurator for the actions setting.

Example

Razor
 
             @( Html.Kendo().TabStrip()
                        .Name("TabStrip")
                        .Items(items =>
                        {
                            items.Add().Text("First Item")
                                .Actions(actions =>
                                {
                                    actions.Add().Icon("gear").Action("myHandler");
                                });
                        })
             )
             

LoadContentFrom(Microsoft.AspNetCore.Routing.RouteValueDictionary)

Sets the Url, which will be requested to return the content.

Parameters

routeValues - Microsoft.AspNetCore.Routing.RouteValueDictionary

The route values of the Action method.

Example

Razor
 
              @( Html.Kendo().PanelBar()
                     .Name("PanelBar")
                     .Items(parent => {
            
                          parent.Add()
                                .LoadContentFrom(MVC.Home.Index().GetRouteValueDictionary());
                      })
             )
              

LoadContentFrom(System.String,System.String)

Sets the Url, which will be requested to return the content.

Parameters

actionName - System.String

The action name.

controllerName - System.String

The controller name.

Example

Razor
 
              @( Html.Kendo().PanelBar()
                     .Name("PanelBar")
                     .Items(parent => {
            
                          parent.Add()
                                .Text("Completely Open Source")
                                .LoadContentFrom("AjaxView_OpenSource", "PanelBar");
                      })
             )
              

LoadContentFrom(System.String,System.String,System.Object)

Sets the Url, which will be requested to return the content.

Parameters

actionName - System.String

The action name.

controllerName - System.String

The controller name.

routeValues - System.Object

Route values.

Example

Razor
 
              @( Html.Kendo().PanelBar()
                     .Name("PanelBar")
                     .Items(parent => {
            
                          parent.Add()
                                .Text("Completely Open Source")
                                .LoadContentFrom("AjaxView_OpenSource", "PanelBar", new { id = 10});
                      })
             )
              

LoadContentFrom(System.String,System.String,Microsoft.AspNetCore.Routing.RouteValueDictionary)

Parameters

actionName - System.String
controllerName - System.String
routeValues - Microsoft.AspNetCore.Routing.RouteValueDictionary

LoadContentFrom(System.String)

Sets the Url, which will be requested to return the content.

Parameters

value - System.String

The url.

Example

Razor
 
              @( Html.Kendo().PanelBar()
                     .Name("PanelBar")
                     .Items(parent => {
            
                          parent.Add()
                                .Text("Completely Open Source")
                                .LoadContentFrom(Url.Action("AjaxView_OpenSource", "PanelBar"));
                      })
             )
              

ToItem()

Returns the inner navigation item

HtmlAttributes(System.Object)

Sets the HTML attributes applied to the outer HTML element rendered for the item

Parameters

attributes - System.Object

The attributes.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Attributes(new {@class="first-item"}))
            )
             

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes applied to the outer HTML element rendered for the item

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The attributes.

LinkHtmlAttributes(System.Object)

Parameters

attributes - System.Object

LinkHtmlAttributes(System.Collections.Generic.IDictionary)

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

Text(System.String)

Sets the text displayed by the item.

Parameters

value - System.String

The value.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("First Item"))
            )
             

Visible(System.Boolean)

Makes the item visible or not. Invisible items are not rendered in the output HTML.

Parameters

value - System.Boolean

The value.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("First Item").Visible((bool)ViewData["visible"]))
            )
             

Enabled(System.Boolean)

Enables or disables the item. Disabled item cannot be clicked, expanded or open (depending on the item type - menu, tabstrip, panelbar).

Parameters

value - System.Boolean

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("First Item").Enabled((bool)ViewData["enabled"]))
            )
             

Selected(System.Boolean)

Selects or unselects the item. By default items are not selected.

Parameters

value - System.Boolean

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("First Item").Selected(true))
            )
             

Route(System.String,Microsoft.AspNetCore.Routing.RouteValueDictionary)

Sets the route to which the item should navigate.

Parameters

routeName - System.String

Name of the route.

routeValues - Microsoft.AspNetCore.Routing.RouteValueDictionary

The route values.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("First Item").Route("Default", new RouteValueDictionary { {"id", 1} }))
            )
             

Route(System.String,System.Object)

Sets the route to which the item should navigate.

Parameters

routeName - System.String

Name of the route.

routeValues - System.Object

The route values.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("First Item").Route("Default", new {id, 1}))
            )
             

Route(System.String)

Sets the route to which the item should navigate.

Parameters

routeName - System.String

Name of the route.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("First Item").Route("Default"))
            )
             

Action(Microsoft.AspNetCore.Routing.RouteValueDictionary)

Sets the action to which the item should navigate

Parameters

routeValues - Microsoft.AspNetCore.Routing.RouteValueDictionary

The route values of the Action method.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("Index").Action(MVC.Home.Index(3).GetRouteValueDictionary()))
            )
             

Action(System.String,System.String,Microsoft.AspNetCore.Routing.RouteValueDictionary)

Sets the action to which the item should navigate

Parameters

actionName - System.String

Name of the action.

controllerName - System.String

Name of the controller.

routeValues - Microsoft.AspNetCore.Routing.RouteValueDictionary

The route values.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("Index").Action("Index", "Home", new RouteValueDictionary{ {"id", 1} }))
            )
             

Action(System.String,System.String,System.Object)

Sets the action to which the item should navigate

Parameters

actionName - System.String

Name of the action.

controllerName - System.String

Name of the controller.

routeValues - System.Object

The route values.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("Index").Action("Index", "Home", new {id, 1}))
            )
             

Action(System.String,System.String)

Sets the action to which the item should navigate

Parameters

actionName - System.String

Name of the action.

controllerName - System.String

Name of the controller.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("Index").Action("Index", "Home"))
            )
             

Url(System.String)

Sets the URL to which the item should navigate

Parameters

value - System.String

The value.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("www.example.com").Url("http://www.example.com"))
            )
             

ImageUrl(System.String)

Sets the URL of the image that should be displayed by the item.

Parameters

value - System.String

The value.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("First Item").ImageUrl("~/Content/first.png"))
            )
             

ImageHtmlAttributes(System.Object)

Sets the HTML attributes for the item image.

Parameters

attributes - System.Object

The attributes.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items
                               .Add().Text("First Item")
                               .ImageUrl("~/Content/first.png")
                               .ImageHtmlAttributes(new {@class="first-item-image"}))
            )
             

ImageHtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes for the item image.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The attributes.

SpriteCssClasses(System.String[])

Sets the sprite CSS class names.

Parameters

cssClasses - System.String[]

The CSS classes.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items
                               .Add().Text("First Item")
                               .SpriteCssClasses("icon", "first-item"))
            )
             

Content(System.Action)

Sets the HTML content which the item should display.

Parameters

value - System.Action

The action which renders the content.

Example

Razor
 
             @( Html.Kendo().Menu()
                       .Name("Menu")
                       .Items(items => items
                                .Add()
                                .Text("First Item")
                                .Content(() =>
                                {
                                    <strong> First Item Content</strong>
                                }))
                       .Render();
            )
             

Content(System.Func)

Sets the HTML content which the item should display.

Parameters

value - System.Func<Object,Object>

The content wrapped in a regular HTML tag or text tag (Razor syntax).

Example

Razor
 
             @(Html.Kendo().Menu()
                  .Name("Menu")
                  .Items(items => items
                           .Add()
                           .Text("First Item")
                           .Content(
                                @<text>
                                        Some text
                                        <strong> First Item Content</strong>
                                </text>
                           );
                  )
             )
             

Content(System.String)

Sets the HTML content which the item should display as a string.

Parameters

value - System.String

The action which renders the content.

Example

Razor
 
             @( Html.Kendo().Menu()
                       .Name("Menu")
                       .Items(items => items
                                .Add()
                                .Text("First Item")
                                .Content("<strong> First Item Content</strong>");
                             )
                       .Render();
            )
             

ContentHtmlAttributes(System.Object)

Sets the HTML attributes of the content element of the item.

Parameters

attributes - System.Object

The attributes.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items
                               .Add().Text("First Item")
                               .Content(() => { ) <strong>First Item Content</strong> @( })
                               .ContentHtmlAttributes(new {@class="first-item-content"})
                        )
            )
             

ContentHtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes of the content element of the item.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The attributes.

Action(System.Linq.Expressions.Expression)

Makes the item navigate to the specified controllerAction method.

Parameters

controllerAction - System.Linq.Expressions.Expression<Action>

The action.

Example

Razor
 
              @( Html.Kendo().Menu()
                         .Name("Menu")
                         .Items(items => items
                                .Add().Text("First Item")
                                .Action<HomeController>(controller => controller.Index()))
            
             )
              

Encoded(System.Boolean)

Sets whether the Text property should be encoded when the item is rendered.

Parameters

isEncoded - System.Boolean

Whether the property should be encoded. Default: true.

Example

Razor
 
             @( Html.Kendo().Menu()
                        .Name("Menu")
                        .Items(items => items.Add().Text("<strong>First Item</strong>").Encoded(false))
            )
             
In this article
PropertiesViewContext - ViewContextMethodsType(Kendo.Mvc.UI.HttpVerbs)Headers(System.Object)Headers(System.Collections.Generic.IDictionary)Data(System.Func)Data(System.String)Icon(System.String)IconClass(System.String)IconPosition(Kendo.Mvc.UI.IconPosition)Closable(System.Boolean)Closable()Actions(System.Action)LoadContentFrom(Microsoft.AspNetCore.Routing.RouteValueDictionary)LoadContentFrom(System.String,System.String)LoadContentFrom(System.String,System.String,System.Object)LoadContentFrom(System.String,System.String,Microsoft.AspNetCore.Routing.RouteValueDictionary)LoadContentFrom(System.String)ToItem()HtmlAttributes(System.Object)HtmlAttributes(System.Collections.Generic.IDictionary)LinkHtmlAttributes(System.Object)LinkHtmlAttributes(System.Collections.Generic.IDictionary)Text(System.String)Visible(System.Boolean)Enabled(System.Boolean)Selected(System.Boolean)Route(System.String,Microsoft.AspNetCore.Routing.RouteValueDictionary)Route(System.String,System.Object)Route(System.String)Action(Microsoft.AspNetCore.Routing.RouteValueDictionary)Action(System.String,System.String,Microsoft.AspNetCore.Routing.RouteValueDictionary)Action(System.String,System.String,System.Object)Action(System.String,System.String)Url(System.String)ImageUrl(System.String)ImageHtmlAttributes(System.Object)ImageHtmlAttributes(System.Collections.Generic.IDictionary)SpriteCssClasses(System.String[])Content(System.Action)Content(System.Func)Content(System.String)ContentHtmlAttributes(System.Object)ContentHtmlAttributes(System.Collections.Generic.IDictionary)Action(System.Linq.Expressions.Expression)Encoded(System.Boolean)
Not finding the help you need?
Contact Support