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

Kendo UI DialogAction TagHelper DialogActionTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

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

Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseDialogActionTagHelper

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-dialog name="dialog">
    <actions>
        <action action="onDialogAction"></action>
    </actions>
</kendo-dialog>

<script>
    function onDialogAction(){
        //handler logic here
    }
</script>

Child Tagsicon

Constructors

Initializes a new instance of the DialogActionTagHelper class.

C#
public DialogActionTagHelper()

Properties

The callback function to be called after pressing the action button.

C#
public string Action { get; set; }

Adds a custom class to the action button.

C#
public string CssClass { get; set; }

Sets a value controlling how the color is applied.

C#
public ButtonFillMode? FillMode { get; set; }

Defines a name of an existing icon in the Kendo UI theme sprite. The icon will be applied as background image of a span element inside the action button. For a list of available icon names, please refer to the List of 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; }

Defines a CSS class - or multiple classes separated by spaced - which are applied to a span element inside the action button. Allows the usage of custom icons.

C#
public string IconClass { get; set; }

A boolean property indicating whether the action button will be decorated as primary button or not.

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

Sets a value controlling the border radius.

C#
public Rounded? Rounded { get; set; }

Sets the size of the component.

C#
public ComponentSize? Size { get; set; }

The text to be shown in the action's button.

C#
public string Text { get; set; }

Sets the color of the component according to the applied theme.

C#
public ThemeColor? ThemeColor { 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>