ToolTip in Rating (SfRating)
18 Oct 20221 minute to read
Tooltip provides additional information about objects that are unfamiliar to users and are not directly displayed in UI. In the Xamarin.Forms SfRating control, tooltip shows the data of
Value. It will be displayed when the mouse is hovered over the rating items and will be disappeared when a rating item is selected.
Set tooltip placement
ToolTipPlacement property, you can define where the tooltip needs to be displayed. The
TooTipPlacement property have the following three types:
By default, value of the
ToolTipPlacementproperty is set to None.
The tooltip will be displayed on top of the rating stars.
rating.TooltipPlacement = TooltipPlacement.TopLeft;
The tooltip will be displayed on bottom of the rating stars.
rating.TooltipPlacement = TooltipPlacement.BottomRight;
The tooltip will be disappeared when setting ToolTipPlacement to None.
rating.TooltipPlacement = TooltipPlacement.None;
Set tooltip precision
ToolTipPrecision property sets the number precisions to be displayed after decimal point in tooltip.
The default value of this property is 1.
rating.TooltipPrecision = 6;