Deseo aplicar un estilo a todas las clases derivadas de Control. ¿Es esto posible con WPF? El siguiente ejemplo no funciona. Quiero que Label, TextBox y Button tengan un Margen de 4.Aplicación de un estilo a todas las clases derivadas en WPF
<Window x:Class="WeatherInfo.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Wetterbericht" Height="300" Width="300">
<Window.Resources>
<Style TargetType="Control">
<Setter Property="Margin" Value="4"/>
</Style>
</Window.Resources>
<Grid>
<StackPanel Margin="4" HorizontalAlignment="Left">
<Label>Zipcode</Label>
<TextBox Name="Zipcode"></TextBox>
<Button>get weather info</Button>
</StackPanel>
</Grid>
</Window>
funciona como un encanto ... Gracias. – Sebastian