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

Kendo UI DrawerItem TagHelper

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("drawer-item", ParentTag = "drawer-items", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("drawer-items", new string[] { "drawer-item-template", "mini-template", "icon" })]
[SuppressTagRendering]
public class DrawerItemTagHelper : TagHelperCollectionItemBase, ITagHelper, ITagHelperComponent, ITemplateComponent

Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseDrawerItemTagHelper

Implements: ITagHelperITagHelperComponentITemplateComponent

Inherited Members TagHelperChildBase.AddSelfToContext(TagHelperContext)TagHelperChildBase.CreateHandler(string)TagHelperChildBase.IdPrefixTagHelper.Process(TagHelperContext, TagHelperOutput)TagHelper.Orderobject.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 DrawerItemTagHelper class.

C#
public DrawerItemTagHelper()

Properties

Defines the class names of the generated item element.

C#
public string CssClass { get; set; }

Toggles the enabled state of the item.

C#
public bool? Enabled { get; set; }

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 bool? Expanded { get; set; }

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#
[HtmlAttributeName("icon")]
public string Icon { get; set; }

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. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string MiniTemplateHandler { get; set; }

Toggles the selected state of the item.

C#
public bool? Selected { get; set; }

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

C#
public bool? Separator { get; set; }

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. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string TemplateHandler { get; set; }

Configures the templates for the DrawerItem.

C#
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }

Implements: ITemplateComponent.Templates

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

C#
public string Text { get; set; }

Methods

Adds the current instance to the parent TagHelper, if applicable.

C#
protected override void AddSelfToParent(TagHelperContext context)
Parameters:contextTagHelperContext

Overrides: TagHelperChildBase.AddSelfToParent(TagHelperContext)

C#
public override void Init(TagHelperContext context)
Parameters:contextTagHelperContext

Overrides: TagHelperChildBase.Init(TagHelperContext)

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelperChildBase.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public Dictionary<string, object> Serialize()
Returns:

Dictionary<string, object>

Serializes the defined templates.

C#
public Dictionary<string, object> SerializeTemplates()
Returns:

Dictionary<string, object>