Change size & spacing of UWP RatingControl

ε祈祈猫儿з 提交于 2019-12-10 10:45:52

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!