Rating Blazor API

Rating Properties

NameTypeDefaultDescription
DisabledboolfalseDisables the interaction with the element.
Localestring"en"Sets or gets the language. Used in conjunction with the property messages.
MaxintDetermines the number of stars that will be displayed.
MessagesobjectN/ASets or gets an object specifying strings used in the element that can be localized. Used in conjunction with the property locale.
Namestring""The name of the element. Used when submiting data inside a Form.
RightToLeftboolfalseSets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
Themestring""Determines the theme. Theme defines the look of the element
UnfocusableboolfalseIf is set to true, the element cannot be focused.
ValueintDetermines the number of stars that will be marked as active.

Rating Methods

NameTypeArgumentsDescription
GetValueintN/AGet the value of the rating.
GetValueAsync()Task<int>'N/A'Gets the &quot;Value&quot; property as Task&lt;int&gt;.
Refreshvoid'N/A'Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements.
Rendervoid'N/A'Re-renders the Blazor Component. This method will make a full re-render.
SetValuevoidint valueSets the value of the rating.Args: int value - Sets the value of the rating
StateHasChangedvoid'N/A'Refreshes the state and Re-renders the Blazor Component, if necessary.

Rating Events

NameTypeDescriptionEvent Detail
OnChangeEventCallback<Event>This event is triggered when the value of the slider is changed. dynamic value- A numeric value indicating the scroll position., dynamic oldValue- A numeric value indicating the previous scroll position.
Changedevent RatingChangedEventHandlerThis event is triggered when the value of the slider is changed. RatingChangedEventArgs