xaml - 更改 UWP 评级控件的大小和间距

标签 xaml uwp uwp-xaml

有一个新的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/

相关文章:

UWP 控件的 XAML 命名空间标识符

wpf - 带有MS SQL Server的通用Windows应用

c# - 我应该在哪里取消注册 UWP Application.Current.Suspending 事件?

c# - 找不到名称/键 X 的资源

c# - UWP 上的水平滑动手势

uwp - 如何在 UWP 中制作树导航器控件

c# - 路由事件 "the member is not recognized or is not accessible"

c# - 透明窗口上的wpf webbrowser

c# - 更改 gridView 位置 WinRT Xaml

wpf - 在 XAML 中设置相对列宽。 '0.5*' 字符串无法转换为长度