I have text block with MaxWidth="80" and want change on Style without remove MaxWidth="80"
the TextBlock is at third party control for sample:
<Window.Resources>
<Style TargetType="TextBox" >
<Setter Property="Foreground" Value="Red" />
<Setter Property="FontSize" Value="10"/>
</Style>
</Window.Resources>
<Grid>
<TextBox FontSize="45" Foreground="Blue" Text="OH My God"/>
</Grid>
In the WPF there is a strict rule which property or style is used.
Attribute has more power than a style.
You can solve this by order: