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

Kendo UI TextArea TagHelper TextAreaTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("kendo-textarea")]
[HtmlTargetElement("textarea-editor", ParentTag = "form-item")]
[HtmlTargetElement("textarea-editor", ParentTag = "property-grid-item")]
[RestrictChildren("label", new string[] { "prefix-options", "suffix-options" })]
public class TextAreaTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IKendoFormEditor

Inheritance: objectTagHelperTagHelperBaseTextAreaTagHelper

Implements: IKendoFormEditorITagHelperITagHelperComponent

Inherited Members TagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.VerifySettings()TagHelperBase.SerializeTemplates()TagHelperBase.GenerateId(TagHelperOutput)TagHelperBase.CreateHandler(string)TagHelperBase.GetRangeValidationParameter<TValue>(ModelExplorer, string)TagHelperBase.ExtractEditFormat(string)TagHelperBase.ToDictionaryHandler(IDictionary<string, string>)TagHelperBase.AddSelfToTemplate(TagHelperContext)TagHelperBase.ViewContextTagHelperBase.GeneratorTagHelperBase.InitializerTagHelperBase.WriterTagHelperBase.ScriptAttributesTagHelperBase.NameTagHelperBase.IdTagHelperBase.SelectorTagHelperBase.IdPrefixTagHelperBase.IsInClientTemplateTagHelperBase.DeferredTagHelperBase.AsModuleTagHelper.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-textarea name="textarea" placeholder="Enter your text here." rows="10" max-length="200"></kendo-textarea>

Constructors

Initializes a new instance of the TextAreaTagHelper class.

C#
public TextAreaTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

If set to false, the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.

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

Sets a value controlling how the color is applied.

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

An expression to be evaluated against the current model.

C#
public ModelExpression For { get; set; }

Specifies the inputmode attribute of the inner <input /> element. It is used to specify the type of on-screen keyboard that should be displayed when the user focuses the input.

C#
public string InputMode { get; set; }

IsNested member.

C#
[HtmlAttributeNotBound]
public bool IsNested { get; set; }

Implements: IKendoFormEditor.IsNested

Adds a label before the textarea. If the textarea has no id attribute, a generated id will be assigned. The string and the function parameters are setting the inner HTML of the label.

C#
[HtmlAttributeName("label")]
public string LabelValue { get; set; }

Defines the layout flow of the component.

C#
public TextAreaLayoutFlow? LayoutFlow { get; set; }

The maximum number of characters that the user can enter.

C#
public double? MaxLength { get; set; }

The maximum number of visible rows to which the textarea can auto-resize. Used in combination with resize: "auto".

C#
public double? MaxRows { get; set; }

The name of the JavaScript function that will handle the change event. Fired when the value of the widget is changed by the user.The event handler function context (available through the keyword this) will be set to the widget instance.

C#
public string OnChange { get; set; }

Defines how the content overflow should be handled

C#
public TextAreaOverflow? Overflow { get; set; }

The hint displayed by the widget when it is empty. Not set by default.

C#
public string Placeholder { get; set; }

If set to true, the widget will be readonly and will not allow user input. The widget is not readonly by default and allows user input.

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

Defines how the widget should be resized

C#
public TextAreaResize? Resize { get; set; }

Sets a value controlling the border radius.

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

The number of visible text lines for the control.

C#
public double? Rows { get; set; }

Sets the size of the component.

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

The value of the widget.

C#
public string Value { get; set; }

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

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

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

C#
protected override Dictionary<string, object> SerializeEvents()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

TryAddAsEditor method.

C#
public bool TryAddAsEditor(TagHelperContext context)
Parameters:contextTagHelperContextReturns:

bool

The result.

Implements: IKendoFormEditor.TryAddAsEditor(TagHelperContext)

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)