Add "Control". to the beginning of the property and remove the TargetType. Then in the styles that come from it, use BasedOn with a StaticResource pointing to the base style.
<Style x:Key="basicStyle"> <Setter Property="Control.FontFamily" Value="Tahoma" /> <Setter Property="Control.FontSize" Value="12" /> </Style> <Style TargetType="{x:Type Label}" BasedOn="{StaticResource basicStyle}"> <Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="VerticalAlignment" Value="Center" /> </Style> <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource basicStyle}"> <Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="VerticalAlignment" Value="Center" /> </Style> <Style TargetType="{x:Type Button}" BasedOn="{StaticResource basicStyle}"> <Setter Property="HorizontalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="Margin" Value="2,4" /> </Style>
Wonderko the sane
source share