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.
tip
The icon, colors, number of stars, and many others are configurable through properties.
Properties
Name | Type | Description |
---|---|---|
IconColor | Color | Gets or sets the rating icons color. |
IconFontFamily | string | Gets or sets the icons font family. |
IconFontSize | double | Gets or sets the icons font size. |
IconText | string | Gets or sets the text used to display rating icons. |
IsReadOnly | bool | Gets or sets if the rating is read-only, i.e. if user interaction is enabled. |
MaxValue | int | Gets or sets the maximum value of the Rating control. |
Precision | double | Gets or sets the value precision. Defines the distance between consecutive values. |
Spacing | double | Gets or sets the spacing between the rating icons. |
UnselectedIconColor | Color | Gets or sets the unselected rating icons color. |
UnselectedIconFontFamily | string | Gets or sets the unselected icons font family. |
UnselectedIconFontSize | double | Gets or sets the unselected icons font size. |
UnselectedIconText | string | Gets or sets the text used to display unselected rating icons. |
Value | double | Gets 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.