ToolTip in WinUI Rating

13 Oct 20221 minute to read

The Rating control tooltip can be enabled by using the EnableToolTip property. When the mouse hovers over the control, it will show the rating value content as a tooltip. The default value is false.

<syncfusion:SfRating Value="3"
     ItemsCount="5" EnableToolTip="True">
</syncfusion:SfRating>
SfRating rating = new SfRating();
rating.Value = 3;
rating.ItemsCount = 5;
rating.EnableToolTip = true;

WinUI Rating control with tooltip

ToolTipFormat for Rating

The tooltip content can be formatted by using the ToolTipFormat property. Custom numeric format strings and Standard numeric format strings can be used to format the tooltip content.

<syncfusion:SfRating Value="2"
     Precision="Exact" ItemsCount="5"
     EnableToolTip="True" ToolTipFormat="0.000">
</syncfusion:SfRating>
SfRating rating = new SfRating();
rating.Value = 2;
rating.Precision= RatingPrecision.Exact;
rating.ItemsCount = 5;
rating.EnableToolTip = true;
rating.ToolTipFormat = "0.000";

TooltipFormat in WinUI Rating control