Thomas
Thomas

Reputation: 4297

Change size & spacing of UWP RatingControl

There's a new RatingControl in UWP that allows you to show ratings as a series of stars. I was wondering how I can change the size of the stars and also the spacing between them.

FontSize does not work like it did on the Telerik version for UWP.

I hope this is possible without restyling the whole control. For example, Microsoft explicitly states "Spacing customization" as a feature:

The rating control has many additional features which can be used. Details for using these features can be found in our MSDN reference documentation. Here is a non-comprehensive list of additional functionality:

  • Great long list performance
  • Compact sizing for tight UI scenarios
  • Continuous value fill and rating
  • Spacing customization
  • Disable growth animations
  • Customization of the number of stars

Upvotes: 2

Views: 452

Answers (1)

kennyzx
kennyzx

Reputation: 12993

If you don't want to edit the control template, a quick way is to use ViewBox container to host the RatingControl, you can resize the RatingControl by resizing the ViewBox.

<ViewBox Width="" Height="">
    <RatingControl .../>
</ViewBox>

Upvotes: 4

Related Questions