问题
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
回答1:
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>
来源:https://stackoverflow.com/questions/51823086/change-size-spacing-of-uwp-ratingcontrol