RatingTagHelper
Kendo UI Rating TagHelper RatingTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-rating")]
[HtmlTargetElement("rating-editor", ParentTag = "form-item")]
[HtmlTargetElement("rating-editor", ParentTag = "property-grid-item")]
[RestrictChildren("label", new string[] { "item-template", "hovered-template", "selected-template" })]
public class RatingTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IKendoFormEditor, ITemplateComponent
Inheritance: objectTagHelperTagHelperBaseRatingTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-rating name="rating" min="1" max="6" value="3"></kendo-rating>
Child Tags
Constructors
Initializes a new instance of the RatingTagHelper class.
Properties
If set to false, the Rating will be: disabled and will not allow the user to change its state.; excluded from the tab order and not receiving focus. or will not submit its value if part of a form..
public bool? Enabled { get; set; }
An expression to be evaluated against the current model.
public ModelExpression For { get; set; }
Specifies the template which is used for rendering the hovered state of the items.
public string HoveredTemplate { get; set; }
Specifies the template which is used for rendering the hovered state of the items. This option expects the name of a JavaScript function that will be called to return the template.
public string HoveredTemplateHandler { get; set; }
Specifies the template which is used for rendering the hovered state of the items. This option expects the ID of the script element that contains the template.
public string HoveredTemplateId { get; set; }
Specifies the template which is used for rendering the hovered state of the items. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent HoveredTemplateView { get; set; }
IsNested member.
[HtmlAttributeNotBound]
public bool IsNested { get; set; }
Implements:
Specifies the template which is used for rendering the items of the Rating.
public string ItemTemplate { get; set; }
Specifies the template which is used for rendering the items of the Rating. This option expects the name of a JavaScript function that will be called to return the template.
public string ItemTemplateHandler { get; set; }
Specifies the template which is used for rendering the items of the Rating. This option expects the ID of the script element that contains the template.
public string ItemTemplateId { get; set; }
Specifies the template which is used for rendering the items of the Rating. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent ItemTemplateView { get; set; }
The value from which the Rating items will be rendered.
public double? Min { get; set; }
The name of the JavaScript function that will handle the change event. Fires when the value of the Rating is changed through user interaction.
public string OnChange { get; set; }
The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the Rating is focused.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnKendoKeydown { get; set; }
The name of the JavaScript function that will handle the select event. Fires when an item is selected through user interaction.
public string OnSelect { get; set; }
Specifies the precision with which an item is selected. The available options are:*item - rate by selecting the whole item. *half - rate by selecting half of the item or the whole item.
public string Precision { get; set; }
If set to true, the Rating will: be in readonly state and will not allow the user to change its state.; be included in the tab order and able to receive focus. or submit data if part of a form..
public bool? Readonly { get; set; }
Specifies the template which is used for rendering the selected state of the items.
public string SelectedTemplate { get; set; }
Specifies the template which is used for rendering the selected state of the items. This option expects the name of a JavaScript function that will be called to return the template.
public string SelectedTemplateHandler { get; set; }
Specifies the template which is used for rendering the selected state of the items. This option expects the ID of the script element that contains the template.
public string SelectedTemplateId { get; set; }
Specifies the template which is used for rendering the selected state of the items. This option expects the IHtmlContent instance containing the created HTML.
public IHtmlContent SelectedTemplateView { get; set; }
Specifies the selection behavior. The available options are:*continuous - all items, starting from the first one, are marked as selected. *single - a single item is marked as selected.
public string Selection { get; set; }
If the option is set, the widget will automatically select the specified item when the Rating receives focus and no previous value has been set.
public double? SelectValueOnFocus { get; set; }
Represents a collection of templates defined for the component.
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }
Implements:
The Rating displays the value of the item through the title attribute when it is hovered.If tooltip is set to false, the widget will not display the value of the items when hovering over them.The tooltips are not visible when the Rating is disabled.
public bool? Tooltip { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
TryAddAsEditor method.
public bool TryAddAsEditor(TagHelperContext context)
The result.
Implements:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: