Getting Started with .NET MAUI Rating
29 Jun 20264 minutes to read
This section explains how to configure a Rating control in a real-time scenario and also provides a walk-through on some of the customization features available in SfRating control.
To quickly get started with the .NET MAUI Rating, watch this video.
Prerequisites
Before proceeding, ensure the following are in place:
- Install .NET 9 SDK or later.
- Set up a .NET MAUI environment with Visual Studio 2022 (v17.8 or later) or Visual Studio 2026 (v18.0.0 or later).
Step 1: Create a new .NET MAUI project
- Go to File > New > Project and choose the .NET MAUI App template.
- Name the project and choose a location. Then, click Next.
- Select the .NET framework version and click Create.
Step 2: Install the Syncfusion® MAUI Inputs NuGet package
- In Solution Explorer, right-click the project and choose Manage NuGet Packages.
- Search for Syncfusion.Maui.Inputs and install the latest version.
- Ensure the necessary dependencies are installed correctly, and the project is restored.
Prerequisites
Before proceeding, ensure the following are in place:
- Install .NET 9 SDK or later is installed.
- Set up a .NET MAUI environment with Visual Studio Code.
- Ensure that the .NET MAUI extension is installed and configured as described here.
Step 1: Create a new .NET MAUI project
- Open the Command Palette by pressing Ctrl+Shift+P and type .NET:New Project and press Enter.
- Choose the .NET MAUI App template.
- Select the project location, type the project name and press Enter.
- Then choose Create project
Step 2: Install the Syncfusion® MAUI Inputs NuGet package
- Press Ctrl + ` (backtick) to open the integrated terminal in Visual Studio Code.
- Ensure you’re in the project root directory where your .csproj file is located.
- Run the command
dotnet add package Syncfusion.Maui.Inputsto install the Syncfusion® .NET MAUI Inputs package. - To ensure all dependencies are installed, run
dotnet restore.
Prerequisites
Before proceeding, ensure the following are set up:
- Ensure you have the latest version of JetBrains Rider.
- Install .NET 9 SDK or later is installed.
- Make sure the MAUI workloads are installed and configured as described here.
Step 1: Create a new .NET MAUI project
- Go to File > New Solution, Select .NET (C#) and choose the .NET MAUI App template.
- Enter the Project Name, Solution Name, and Location.
- Select the .NET framework version and click Create.
Step 2: Install the Syncfusion® MAUI Inputs NuGet package
- In Solution Explorer, right-click the project and choose Manage NuGet Packages.
- Search for Syncfusion.Maui.Inputs and install the latest version.
- Ensure the necessary dependencies are installed correctly, and the project is restored.
Step 3: Register Syncfusion handler
Make sure to add the namespace.
using Syncfusion.Maui.Core.Hosting;Register the Syncfusion core handler in your CreateMauiApp method of MauiProgram.cs file to use Syncfusion controls.
builder.ConfigureSyncfusionCore();Step 4: Import Rating namespace
Add the following namespace in your XAML or C#.
xmlns:rating="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"using Syncfusion.Maui.Inputs;Step 5: Add the Rating component
Initialize the SfRating control and you can select a rating value, providing a simple and interactive way to give feedback.
<rating:SfRating x:Name="rating" />SfRating rating = new SfRating();
this.Content = rating;
You can download the Rating Getting Started sample from GitHub.