This topic gives and overview of the key features of the Rating component that are common for both RadShapeRating and RadTemplatedRating.
RadShapeRating and RadTemplatedRating inherit from the RatingBase abstract class that provides their common features.
RadRating exposes a Value property that is used to set and read the number of the selected rating items.
<telerikInput:RadShapeRating Value="4" />
RadRating supports read-only mode in which the end user cannot change its Value (the number of the selected items). You could enable the read-only mode through IsReadOnly property:
<telerikInput:RadShapeRating Value="4" IsReadOnly="True" />
- ItemsCount: Defines the number of the items that are visualized in the rating control. The default value is 5 items;
- ItemsSpacing: Specifies the distance between the separate items in pixels. Default value is 10px;
<telerikInput:RadShapeRating Value="4" ItemsCount="7" ItemsSpacing="20" />
RadRating provides the following event:
ValueChanged: Occurs whenever Value property is changed. The ValueChanged event handler receives two parameters:
- The sender argument which is of type object, but can be cast to RadShapeRating or RadTemplatedRating type;
- А ValueChangedEventArgs object which exposes both old and new values of the Value property.