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

Kendo UI AIPromptViewPromptCommand TagHelper AIPromptViewPromptCommandTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("prompt-command", ParentTag = "prompt-commands", TagStructure = TagStructure.NormalOrSelfClosing)]
[HtmlTargetElement("prompt-command", ParentTag = "items", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("items", new string[] { "icon" })]
[SuppressTagRendering]
public class AIPromptViewPromptCommandTagHelper : TagHelperCollectionItemBase, ITagHelper, ITagHelperComponent

Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseAIPromptViewPromptCommandTagHelper

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-aiprompt name="aiprompt">
    <aiprompt-views>
        <aiprompt-view type="ViewType.Prompt" name="customView">
            <prompt-commands>
                <prompt-command icon="edit"></prompt-command>
            </prompt-commands>
        </aiprompt-view>
    </aiprompt-views>
</kendo-aiprompt>

Child Tagsiconitems

Constructors

Initializes a new instance of the AIPromptViewPromptCommandTagHelper class.

C#
public AIPromptViewPromptCommandTagHelper()

Properties

The icon name of the command item.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; }

The id of the command item.

C#
public string Id { get; set; }

The text of the command item.

C#
public string Text { 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>