Skip to content
Javier Suárez edited this page Aug 16, 2020 · 6 revisions

Rate

Allows user to rate something by tapping on the icon that represents a rate.

Features

  • Can specify the rate items count.
  • Allow to customize the rate icon.
  • ControlTemplate support.

Using the control

<controls:Rate />

Appearance

The ItemSize property sets the size of the rate items.

<controls:Rate
    ItemCount="5"
    ItemSize="20"
    Value="3"
    ShowText="True"
    Text="Set ItemSize"/>

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

<controls:Rate
    ItemCount="4"
    ItemSize="30"
    Value="3"
    ShowText="True"
    Text="Set Number of Items"/>

Can set the fill color for the selected and unselected items.

<controls:Rate
    HorizontalOptions="Center"
    ItemCount="5"
    ItemSize="30"
    SelectedFill="Red"
    SelectedStroke="DarkRed"
    SelectedStrokeWidth="2"
    UnSelectedFill="LightGray"
    UnSelectedStroke="DarkGray"
    UnSelectedStrokeWidth="0.5"
    Value="3"
    ShowText="True"
    Text="Rating Colors"/>

Restrict the user interaction

The control provides support for changeable or unchangeable values. This is achieved by the IsReadOnly property.

<controls:Rate
    ItemCount="5"
    ItemSize="30"
    Value="3"
    IsReadOnly="True"/>