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

Kendo UI AppBarItem TagHelper AppBarItemTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

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

Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseAppBarItemTagHelper

Implements: ITagHelperITagHelperComponentITemplateComponent

Inherited Members TagHelperChildBase.Init(TagHelperContext)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()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-appbar name="appbar">
    <items>
        <appbar-item class-name="custom-class" template="<span>AppBar Custom Content</span>"></appbar-item>
    </items>
</kendo-appbar>

Child Tagstemplate

Constructors

Initializes a new instance of the AppBarItemTagHelper class.

C#
public AppBarItemTagHelper()

Properties

Defines a set CSS classes for the item.

C#
public string ClassName { get; set; }

The template which renders as content for the appbar item. Valid only for the contentItem type

C#
public string Template { get; set; }

The template which renders as content for the appbar item. Valid only for the contentItem type This option expects the name of a JavaScript function that will be called to return the template.

C#
public string TemplateHandler { get; set; }

The template which renders as content for the appbar item. Valid only for the contentItem type This option expects the ID of the script element that contains the template.

C#
public string TemplateId { get; set; }

Represents a collection of templates defined for the component.

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

Implements: ITemplateComponent.Templates

The template which renders as content for the appbar item. Valid only for the contentItem type This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent TemplateView { get; set; }

Defines the type of positioning

C#
public AppBarItemType? Type { get; set; }

Determines the width of the item. Valid only for the spacer items. Numeric values are treated as pixels.

C#
public string Width { get; set; }

Methods

Adds the current TagHelper instance to its parent TagHelper.

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

The TagHelper context.

Overrides: TagHelperChildBase.AddSelfToParent(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>