Restrict user selection in .NET MAUI Rating (SfRating)
21 Jul 20261 minute to read
Prerequisites
Before using the SfRating, ensure the following NuGet package is installed in your .NET MAUI project:
Syncfusion.Maui.Inputs
For step-by-step setup, refer to the Getting Started documentation.
IsReadOnly
.NET MAUI Rating prevents users from changing the rating value once it has been set, which is useful for displaying read-only feedback such as a product or service rating shown to all viewers.
The IsReadOnly property of type bool controls whether users can change the rating value. Setting it to true makes the value unchangeable. The default value is false. When IsReadOnly is true, tap and drag interactions that would normally modify the value are blocked, and the pointer feedback typically shown on touch or hover is suppressed.
<rating:SfRating IsReadOnly="true" />SfRating rating = new SfRating()
{
IsReadOnly = true,
};