Appearance and Styling

14 Jun 20191 minute to read

When the default view is not needed, you can customize the view of Xamarin.iOS SfRating control. The SfRating control provides support to customize the size, item count, and space between rating items.

Set Size

The ItemSize property sets the size of the rating items.


By default, property value is 50.

rating.ItemSize = 20;

SfRatinglayout customization

Set Number of Items

The ItemCount property sets the number of rating items to be displayed.


The default property value is 5.

rating.ItemCount = 4;

Set number of rating items

Set Space between Items

The ItemSpacing property sets the spacing between the rating items.


By default, property value is 5.

rating.ItemSpacing = 20;

Space between rating items

Rating Settings

For styling customization, set the RatingSettings property value with SfRatingSettings object instance.

SfRating rating;
SfRatingSettings ratingSetings;

public override void ViewDidLoad()
	rating = new SfRating();
	ratingSettings = new SfRatingSettings();
	ratingSettings.RatedFill = UIColor.Red;
	ratingSettings.UnRatedFill = UIColor.Blue;
	ratingSettings.RatedStrokeWidth = 5;
	ratingSettings.UnRatedStrokeWidth = 3;
	rating.RatingSettings = ratingSettings;