【发布时间】:2016-07-24 10:15:15
【问题描述】:
我在 Windows 通用应用程序 C# 中使用 WinRT XAML 工具包。 我想改变加号(+)和减号(-)按钮之间的距离并增加两个按钮的大小。
有一些模板可用于 WPF,但不适用于通用应用程序。
Here is image 请告诉我如何实现它?
【问题讨论】:
标签: xaml winrt-xaml winrt-xaml-toolkit
我在 Windows 通用应用程序 C# 中使用 WinRT XAML 工具包。 我想改变加号(+)和减号(-)按钮之间的距离并增加两个按钮的大小。
有一些模板可用于 WPF,但不适用于通用应用程序。
Here is image 请告诉我如何实现它?
【问题讨论】:
标签: xaml winrt-xaml winrt-xaml-toolkit
模板在工具包here中。
您可以通过更改这些按钮样式来添加Margin:
<!-- DecrementButtonStyle -->
<Style
x:Key="DecrementButtonStyle"
BasedOn="{StaticResource NumericUpDownButtonStyle}"
TargetType="RepeatButton">
<Setter
Property="Content"
Value="➖" />
<Setter
Property="Margin"
Value="5" />
</Style>
<!-- IncrementButtonStyle -->
<Style
x:Key="IncrementButtonStyle"
BasedOn="{StaticResource NumericUpDownButtonStyle}"
TargetType="RepeatButton">
<Setter
Property="Content"
Value="➕" />
<Setter
Property="Margin"
Value="5" />
</Style>
【讨论】: