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

Defines the fluent API for configuring DrawerItem

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

Initializes a new instance of the DrawerItemBuilder class.

C#
public DrawerItemBuilder(DrawerItem container)
Parameters:containerDrawerItem

Properties

Gets the settings being configured.

C#
protected DrawerItem Container { get; }

Methods

Defines custom HTML attributes of the generated item element.

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

The object to be mapped to the attribute collection

Returns:

DrawerItemBuilder

Returns the current instance of DrawerItemBuilder for method chaining.

Defines custom HTML attributes of the generated item element.

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

The object to be mapped to the attribute collection

Returns:

DrawerItemBuilder

Returns the current instance of DrawerItemBuilder for method chaining.

Defines the class names of the generated item element.

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

The value for CssClass

Returns:

DrawerItemBuilder

Returns the current DrawerItemBuilder instance.

Toggles the enabled state of the item.

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

The value for Enabled

Returns:

DrawerItemBuilder

Returns the current DrawerItemBuilder instance.

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()
Returns:

DrawerItemBuilder

Returns the current DrawerItemBuilder instance.

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 for Expanded

Returns:

DrawerItemBuilder

Returns the current DrawerItemBuilder instance.

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.Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.

C#
public DrawerItemBuilder Icon(Action<DrawerItemIconSettingsBuilder> configurator)
Parameters:configuratorAction<DrawerItemIconSettingsBuilder>

The DrawerItemIconSettingsBuilder for the icon setting.

Returns:

DrawerItemBuilder

Returns the current instance of 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.Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.

C#
public DrawerItemBuilder Icon(string icon)
Parameters:iconstring

The icon.

Returns:

DrawerItemBuilder

Returns the current instance of DrawerItemBuilder .

Specifies nested child items.

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

The configurator for the items setting.

Returns:

DrawerItemBuilder

Returns the current instance of DrawerItemBuilder for method chaining.

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

Returns the current DrawerItemBuilder instance.

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 templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for MiniTemplate

Returns:

DrawerItemBuilder

Returns the current DrawerItemBuilder instance.

Toggles the selected state of the item.

C#
public DrawerItemBuilder Selected()
Returns:

DrawerItemBuilder

Returns the current DrawerItemBuilder instance.

Toggles the selected state of the item.

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

The value for Selected

Returns:

DrawerItemBuilder

Returns the current DrawerItemBuilder instance.

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

C#
public DrawerItemBuilder Separator()
Returns:

DrawerItemBuilder

Returns the current DrawerItemBuilder instance.

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 for Separator

Returns:

DrawerItemBuilder

Returns the current DrawerItemBuilder instance.

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

Returns the current DrawerItemBuilder instance.

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 templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for Template

Returns:

DrawerItemBuilder

Returns the current DrawerItemBuilder instance.

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 for Text

Returns:

DrawerItemBuilder

Returns the current DrawerItemBuilder instance.