Skip to main content

Rating

Overview

The Grial Rating control provides a great solution for displaying ratings across various domains such as books, movies, music, vacation spots, and more.

Its flexibility covers both read-only modes for informative displays, and editing capabilities for user engagement in which people can rate with s simple swipe.

Rating example
tip

The icon, colors, number of stars, and many others are configurable through properties.

Properties

NameTypeDescription
IconColorColorGets or sets the rating icons color.
IconFontFamilystringGets or sets the icons font family.
IconFontSizedoubleGets or sets the icons font size.
IconTextstringGets or sets the text used to display rating icons.
IsReadOnlyboolGets or sets if the rating is read-only, i.e. if user interaction is enabled.
MaxValueintGets or sets the maximum value of the Rating control.
PrecisiondoubleGets or sets the value precision. Defines the distance between consecutive values.
SpacingdoubleGets or sets the spacing between the rating icons.
UnselectedIconColorColorGets or sets the unselected rating icons color.
UnselectedIconFontFamilystringGets or sets the unselected icons font family.
UnselectedIconFontSizedoubleGets or sets the unselected icons font size.
UnselectedIconTextstringGets or sets the text used to display unselected rating icons.
ValuedoubleGets or sets the value of the Rating control.

Rating Label

Grial also provides a custom control called RatingLabel for an alternative compact visualization based on a Star icon and the double value in numbers. This control is a ContentView (it uses the Rating control to display the icon) and its code is distributed as part of Grial templates so making color, layout, and other variations is very simple.

Rating Label example