有一个新的RatingControl在 UWP 中,您可以将评级显示为一系列星星。我想知道如何改变星星的大小以及它们之间的间距。
FontSize 的工作方式与 UWP 的 Telerik 版本不同。
我希望这可以在不重新设计整个控件的情况下实现。例如,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
最佳答案
如果您不想编辑控件模板,一个快速的方法是使用 ViewBox
容器来托管 RatingControl
,您可以调整 RatingControl 的大小
通过调整 ViewBox
的大小。
<ViewBox Width="" Height="">
<RatingControl .../>
</ViewBox>
关于xaml - 更改 UWP 评级控件的大小和间距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51823086/