Articles in this section

How to notify when the rating is given in the .NET MAUI Rating Control?

This article demonstrates how to receive notifications when a rating is given in the
.NET MAUI Rating control. Use the ValueChanged event, which is triggered whenever a rating is provided to achieve this.

Follow these steps:

Step 1: Initialize the Rating Control with the ValueChanged event.

XAML

<StackLayout VerticalOptions="Center">
   <inputs:SfRating Precision="Standard"
                    RatingShape="Heart"
                    ValueChanged="SfRating_ValueChanged">
   </inputs:SfRating>
</StackLayout>

Step 2: Implement a logic in the ValueChanged event handler method to notify the message.

C#

private void SfRating_ValueChanged(object sender, Syncfusion.Maui.Inputs.ValueChangedEventArgs e)
{
   var ratingValue = Math.Ceiling(e.value);
   App.Current.MainPage.DisplayAlert("Thank you",$"You've given a rating of {ratingValue}","Ok");
}

Output

ValueChangedEvent.gif

Conclusion:
I hope you enjoyed learning how to be notified when giving a rating using the .NET MAUI Rating control.

Refer to our .NET MAUI Rating feature tour page to learn about its other groundbreaking feature representations. You can explore our .NET MAUI Rating documentation to understand how to present and manipulate data.

For current customers, check out our .NET MAUI components from the License and Downloads page. If you are new to Syncfusion, try our 30-day free trial to check out our .NET MAUI Rating and other .NET MAUI components.

Please let us know in the following comments section if you have any queries or require clarifications. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied