New to Telerik UI for WinUI? Download free 30-day trial

Getting Started with WinUI Rating

This topic demonstrates how to start using RadRating for WinUI.

Assembly References

In order to use the RadChart suite in your projects, you have to add references to the following assembly:

  • Telerik.WinUI.Controls.dll

Defining a RadRating

Here is how RadRating is declared in XAML:

You can access the RadRating control through an alias pointing to the Telerik.UI.Xaml.Controls.Input namespace: xmlns:input="using:Telerik.UI.Xaml.Controls.Input"

Example 1: Adding a RadRating in XAML

<input:RadRating /> 

Modifying RadRating Items

The number of rating items can be changed by setting the AutoGeneratedItemsCount or manually adding items of type RadRatingItem.

Example 2: Manually Declare RadRatingItems

<input:RadRating> 
    <input:RadRating.Items> 
        <input:RadRatingItem/> 
        <input:RadRatingItem/> 
        <input:RadRatingItem/> 
        <input:RadRatingItem/> 
        <input:RadRatingItem/> 
    </input:RadRating.Items> 
</input:RadRating> 

Only one of the methods for defining the number of items should be used. If you try to add items manually when the AutoGeneratedItemsCount is set, or try to set this property when the current items have been added manually, this would cause an exception.

Telerik UI for WinUI Learning Resources

In this article
Not finding the help you need?