DrawerItemBuilder
Defines the fluent API for configuring DrawerItem
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Syntax:
public class DrawerItemBuilder
Inheritance: objectDrawerItemBuilder
Inherited Members
Constructors
Initializes a new instance of the DrawerItemBuilder class.
Properties
Gets the settings being configured.
protected DrawerItem Container { get; }
Methods
Defines custom HTML attributes of the generated item element.
public DrawerItemBuilder Attributes(IDictionary<string, object> attributes)
The object to be mapped to the attribute collection
Returns:Returns the current instance of DrawerItemBuilder for method chaining.
Defines custom HTML attributes of the generated item element.
public DrawerItemBuilder Attributes(object attributes)
The object to be mapped to the attribute collection
Returns:Returns the current instance of DrawerItemBuilder for method chaining.
Defines the class names of the generated item element.
public DrawerItemBuilder CssClass(string value)
The value for CssClass
Returns:Returns the current DrawerItemBuilder instance.
Toggles the enabled state of the item.
public DrawerItemBuilder Enabled(bool value)
The value for Enabled
Returns: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.
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.
public DrawerItemBuilder Expanded(bool value)
The value for Expanded
Returns: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.
public DrawerItemBuilder Icon(Action<DrawerItemIconSettingsBuilder> configurator)
The DrawerItemIconSettingsBuilder for the icon setting.
Returns: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.
public DrawerItemBuilder Icon(string icon)
The icon.
Returns:Returns the current instance of DrawerItemBuilder .
Specifies nested child items.
public DrawerItemBuilder Items(Action<DrawerItemFactory> configurator)
The configurator for the items setting.
Returns: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.
public DrawerItemBuilder MiniTemplate<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the minitemplate.
Returns: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.
public DrawerItemBuilder MiniTemplateHandler(string templateHandler)
The handler that returs the template for MiniTemplate
Returns:Returns the current DrawerItemBuilder instance.
Toggles the selected state of the item.
Toggles the selected state of the item.
public DrawerItemBuilder Selected(bool value)
The value for Selected
Returns:Returns the current DrawerItemBuilder instance.
Defines a separator item. When set to true, the Drawer renders a separator instead of a clickable item.
Defines a separator item. When set to true, the Drawer renders a separator instead of a clickable item.
public DrawerItemBuilder Separator(bool value)
The value for Separator
Returns: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.
public DrawerItemBuilder Template<TModel>(TemplateBuilder<TModel> template)
A Template component that configures the template.
Returns: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.
public DrawerItemBuilder TemplateHandler(string templateHandler)
The handler that returs the template for Template
Returns:Returns the current DrawerItemBuilder instance.
Defines the text of the item. If not set, the generated item renders no text.
public DrawerItemBuilder Text(string value)
The value for Text
Returns:Returns the current DrawerItemBuilder instance.