Beelal Ahmed
Beelal Ahmed

Reputation: 51

WinRT XAML Toolkit NumericUpDown Template

I am using WinRT XAML Toolkit in Windows Universal Application C#. I want to change distance between plus(+) and minus(-) buttons and increase size of both buttons.

There are templates available for WPF but not for Universal app.

Here is image Please advice me how can I achieve it?

Upvotes: 1

Views: 307

Answers (1)

Filip Skakun
Filip Skakun

Reputation: 31724

The template is in the toolkit here.

You might be able to get what you want by changing these button styles to add the Margin:

<!-- DecrementButtonStyle -->
<Style
    x:Key="DecrementButtonStyle"
    BasedOn="{StaticResource NumericUpDownButtonStyle}"
    TargetType="RepeatButton">
    <Setter
        Property="Content"
        Value="&#x2796;" />
    <Setter
        Property="Margin"
        Value="5" />
</Style>

<!-- IncrementButtonStyle -->
<Style
    x:Key="IncrementButtonStyle"
    BasedOn="{StaticResource NumericUpDownButtonStyle}"
    TargetType="RepeatButton">
    <Setter
        Property="Content"
        Value="&#x2795;" />
    <Setter
        Property="Margin"
        Value="5" />
</Style>

Upvotes: 1

Related Questions