I defined a style for Label in App.xaml.
<Application.Resources>
<ResourceDictionary>
<Style TargetType="Label" >
<Setter Property="Foreground" Value="Blue"/>
</Style>
<Style TargetType="TextBlock" >
<Setter Property="Foreground" Value="Blue"/>
</Style>
</ResourceDictionary>
</Application.Resources>
The Style applied to the label Control in my MainWindow.xaml proerly. but when i tried to have a Foreground set explicitly on the control, it was not working (I wonder). The color defined in App.xaml is still applying (only for Label).
<Grid>
<Label Content="Label" Foreground="Black" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock Text="TextBlock" Foreground="Black" VerticalAlignment="Bottom" Height="15.96" Margin="257.537,0,270.003,86" />
</Grid>
The same logic works for Textblock and all controls. Any suggestions please?