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

Kendo UI prefixOptions TagHelper TextBoxPrefixOptionsSettingsTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("prefix-options", ParentTag = "kendo-textbox", TagStructure = TagStructure.NormalOrSelfClosing)]
[HtmlTargetElement("prefix-options", ParentTag = "textbox-editor", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("prefix-template", new string[] { "textbox-prefix-options-icon" })]
[SuppressTagRendering]
public class TextBoxPrefixOptionsSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent, ITemplateComponent

Inheritance: objectTagHelperTagHelperChildBaseTextBoxPrefixOptionsSettingsTagHelper

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-textbox name="textbox">
    <prefix-options icon="search"></prefix-options>
</kendo-textbox>

Constructors

Initializes a new instance of the TextBoxPrefixOptionsSettingsTagHelper class.

C#
public TextBoxPrefixOptionsSettingsTagHelper()

Properties

Defines the name for an existing icon in a Kendo UI theme or SVG contentSet 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; }

If set to false, the prefix adornment will not have a separator.

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

The template for the prefix adornment of the component.

C#
public string Template { get; set; }

The template for the prefix adornment of the component. 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 for the prefix adornment of the component. This option expects the ID of the script element that contains the template.

C#
public string TemplateId { get; set; }

A collection of templates that can be used in the component.

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

Implements: ITemplateComponent.Templates

The template for the prefix adornment of the component. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent TemplateView { 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>