1
我在Windows通用应用程序C#中使用WinRT XAML工具包。 我想改变加号(+)和减号( - )按钮之间的距离,并增加两个按钮的大小。WinRT XAML工具包NumericUpDown模板
有一些模板可用于WPF,但不适用于通用应用程序。
Here is image 请指教我如何实现它?
我在Windows通用应用程序C#中使用WinRT XAML工具包。 我想改变加号(+)和减号( - )按钮之间的距离,并增加两个按钮的大小。WinRT XAML工具包NumericUpDown模板
有一些模板可用于WPF,但不适用于通用应用程序。
Here is image 请指教我如何实现它?
该模板位于工具包here中。
你也许能够得到你想要的东西通过改变这些按钮样式添加Margin
:在Windows通用应用程序异常
<!-- 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>
其断码。 –
那么,什么是例外和堆栈?顺便说一句,我刚刚意识到模板中的按钮已经指定了边距,所以您可能需要将它们设置在模板中的其他位置。 –
感谢您的指导。它现在有效。 –