Class RatingItemContext
Represents the context object passed to EmptyTemplate and FullTemplate for rendering rating item content.
Inheritance
Namespace: Syncfusion.Blazor.Inputs
Assembly: Syncfusion.Blazor.dll
Syntax
public class RatingItemContext : Object
Remarks
This class provides contextual information about individual rating items, including their index and selection value, which can be used within templates to customize the appearance and behavior of rating items.
Constructors
RatingItemContext()
Declaration
public RatingItemContext()
Properties
Index
Gets or sets the zero-based index of the rating item.
Declaration
public int Index { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An integer representing the index of the rating item. The value ranges from 0 to ItemsCount - 1, where ItemsCount is the total number of rating items in the component. |
Remarks
For example, if there are 5 rating items in the component, the index for the first item would be 0, the index for the second item would be 1, and so on.
Value
Gets or sets the selection value for the rating item, indicating how much of the item is selected.
Declaration
public double Value { get; set; }
Property Value
Type | Description |
---|---|
System.Double | A double value ranging from 0 to 1, where 0 represents no selection and 1 represents a fully selected item. |
Remarks
For example, if Value is set to 0.5, then half of the rating item will be visually selected. This property is particularly useful for implementing partial selections in rating items.