Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

x:Type missing in UWP - How override base control style?

Tags:

c#

.net

uwp

in WPF I override the basic control styles with the following Code:

<Style TargetType="{x:Type Button}" BasedOn="{StaticResource  {x:Type Button}}">
    <Setter Property="Padding" Value="5" />
    <Setter Property="Margin" Value="{StaticResource margin}" />
</Style>

In UWP the x:Type in XAMl is gone. So how can I accomplish the above code in UWP? Thanks.

like image 866
Briefkasten Avatar asked Nov 06 '15 08:11

Briefkasten


1 Answers

This should be it:

<Style TargetType="Button">
    <Setter Property="Padding" Value="5" />
    <Setter Property="Margin" Value="{StaticResource margin}" />
</Style>
like image 168
sibbl Avatar answered Sep 21 '22 02:09

sibbl