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

Kendo UI ChatFileAction TagHelper ChatFileActionTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("file-action", ParentTag = "file-actions", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("icon", new string[] { })]
[SuppressTagRendering]
public class ChatFileActionTagHelper : TagHelperCollectionItemBase, ITagHelper, ITagHelperComponent

Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseChatFileActionTagHelper

Implements: ITagHelperITagHelperComponent

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-chat name="chat">
    <file-actions>
        <file-action icon="k-icon k-i-download" name="download" text="Download" />
    </file-actions>
</kendo-chat>

Child Tagsicon

Constructors

Creates a ChatFileActionTagHelper instance.

C#
public ChatFileActionTagHelper()

Properties

Defines the icon class for the context menu action. The icon appears next to the action text in the context menu.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; }

Defines the name identifier for the context menu action. This is used internally to identify which action was triggered.

C#
public string Name { get; set; }

Defines the display text for the context menu action. This text is shown to users in the context menu.

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 Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelperChildBase.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the Chat File Action settings.

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

Dictionary<string, object>