I can create a button with rounded corners like this (from How to create/make rounded corner buttons in WPF?):
<Button>
<Button.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</Button.Resources>
</Button>
How can I define this inside a style and then apply this style for each button ? I tried creating a style like this, but the CornerRadius is not available :
<Style x:Key = "myButtonStyle" TargetType = "Button">
<Setter Property = "Height" Value = "30"/>
<Setter Property = "Width" Value = "80"/>
<Setter Property = "Margin" Value = "10"/>
</Style>
Like this Pavel ?
<Style x:Key="s2" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Background" Value = "Red" />
<Setter Property="CornerRadius" Value="5"/>
</Style>
WPF won't let me