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

Defines the fluent API for configuring the DrawerItem settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class DrawerItemBuilder

Inheritance: objectDrawerItemBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initialize the DrawerItemBuilder

C#
public DrawerItemBuilder(DrawerItem settings)
Parameters:settingsDrawerItem

The DrawerItem

Methods

C#
public DrawerItemBuilder Attributes(IDictionary<string, object> attributes)
Parameters:attributesIDictionary<string, object>Returns:

DrawerItemBuilder

C#
public DrawerItemBuilder Attributes(object attributes)
Parameters:attributesobjectReturns:

DrawerItemBuilder

Defines the class names of the generated item element.

C#
public DrawerItemBuilder CssClass(string value)
Parameters:valuestring

The value that configures the cssclass.

Returns:

DrawerItemBuilder

Toggles the enabled state of the item.

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

The value that configures the enabled.

Returns:

DrawerItemBuilder

Toggles the initial expanded state of the item. When set to true, the item starts expanded and its child items are visible. Clicking a parent item toggles expand and collapse regardless of this setting.

C#
public DrawerItemBuilder Expanded(bool value)
Parameters:valuebool

The value that configures the expanded.

Returns:

DrawerItemBuilder

Defines the name for an existing icon in a Kendo UI theme.See web font icons help article for more details on Kendo UI icons.

C#
public DrawerItemBuilder Icon(string value)
Parameters:valuestring

The value that configures the icon.

Returns:

DrawerItemBuilder

C#
public DrawerItemBuilder Items(Action<DrawerItemFactory> configurator)
Parameters:configuratorAction<DrawerItemFactory>Returns:

DrawerItemBuilder

Sets a custom template function for the item in mini mode. The implemented items surface supports function values only. The function must return the item markup used while the Drawer is collapsed in mini mode. If mini.template is configured, it takes precedence over items.miniTemplate.

C#
public DrawerItemBuilder MiniTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the minitemplate.

Returns:

DrawerItemBuilder

Sets a custom template function for the item in mini mode. The implemented items surface supports function values only. The function must return the item markup used while the Drawer is collapsed in mini mode. If mini.template is configured, it takes precedence over items.miniTemplate.

C#
public DrawerItemBuilder MiniTemplateHandler(string value)
Parameters:valuestring

The value that configures the minitemplate.

Returns:

DrawerItemBuilder

Toggles the selected state of the item.

C#
public DrawerItemBuilder Selected(bool value)
Parameters:valuebool

The value that configures the selected.

Returns:

DrawerItemBuilder

Defines a separator item. When set to true, the Drawer renders a separator instead of a clickable item.

C#
public DrawerItemBuilder Separator(bool value)
Parameters:valuebool

The value that configures the separator.

Returns:

DrawerItemBuilder

Sets a custom template function for the item. The implemented items surface supports function values only. The function must return the item markup. If the top-level template option is configured, it takes precedence over items and per-item templates are not used.

C#
public DrawerItemBuilder Template<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

DrawerItemBuilder

Sets a custom template function for the item. The implemented items surface supports function values only. The function must return the item markup. If the top-level template option is configured, it takes precedence over items and per-item templates are not used.

C#
public DrawerItemBuilder TemplateHandler(string value)
Parameters:valuestring

The value that configures the template.

Returns:

DrawerItemBuilder

Defines the text of the item. If not set, the generated item renders no text.

C#
public DrawerItemBuilder Text(string value)
Parameters:valuestring

The value that configures the text.

Returns:

DrawerItemBuilder