Kendo UI restrictions TagHelper
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
C#
[HtmlTargetElement("restrictions", ParentTag = "file-attachment", TagStructure = TagStructure.WithoutEndTag)]
[SuppressTagRendering]
public class ChatFileAttachmentRestrictionsSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent
Inheritance: objectTagHelperTagHelperChildBaseChatFileAttachmentRestrictionsSettingsTagHelper
Implements:
Inherited Members
Example:
csharp
@addTagHelper *, Kendo.Mvc
@{
string[] allowedExtensions = new string[] { ".jpg", ".png", ".pdf" };
}
<kendo-chat name="chat">
<file-attachment>
<restrictions allowed-extensions="allowedExtensions" />
</file-attachment>
</kendo-chat>
Constructors
Initializes a new instance of the ChatFileAttachmentRestrictionsSettingsTagHelper class.
C#
public ChatFileAttachmentRestrictionsSettingsTagHelper()
Properties
Array of allowed file extensions (e.g., [".jpg", ".png", ".pdf"]).
C#
public string[] AllowedExtensions { get; set; }
Maximum allowed file size in bytes.
C#
public double? MaxFileSize { get; set; }
Minimum allowed file size in bytes.
C#
public double? MinFileSize { get; set; }
Methods
Adds the current instance to the parent TagHelper, if applicable.
C#
protected override void AddSelfToParent(TagHelperContext context)
Overrides:
C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.