Precision in WinUI Rating

4 Oct 20221 minute to read

The Rating control provides an option to set an accuracy level for ratings with flexible precision to handle full, half, or exact values using the Precision property. The default value is Full.

Full

The rating value can be provided with the nearest rounded value.

<syncfusion:SfRating Value="3" 
     Precision="Full" ItemsCount="5">
</syncfusion:SfRating>
SfRating rating = new SfRating();
rating.Value = 3;
rating.Precision = RatingPrecision.Full;
rating.ItemsCount = 5;

WinUI Rating control with full precision

Half

The rating value can be provided with the nearest half value.

<syncfusion:SfRating Value="3.5"
     Precision="Half" ItemsCount="5">
</syncfusion:SfRating>
SfRating rating = new SfRating();
rating.Value = 3.5;
rating.Precision = RatingPrecision.Half;
rating.ItemsCount = 5;

WinUI Rating control with half precision

Exact

The rating value can be provided with the exact value.

<syncfusion:SfRating Value="3.7"
     Precision="Exact" ItemsCount="5">
</syncfusion:SfRating>
SfRating rating = new SfRating();
rating.Value = 3.7;
rating.Precision = RatingPrecision.Exact;
rating.ItemsCount = 5;

WinUI Rating control with exact precision