How do I apply a style defined in my Application.xaml to all the textboxes in a particular window? I don\'t want to type Style=\"{StaticResource MyStyle}\" with
Then just add the Style to your App.Xaml or your Theme.xaml (if you have one) or even your Window.Resources if you just have 1 Window, just make sure you don't set the x:Key
Example:
This will apply to all TextBoxes(no x:Key)
<Style TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="Red" />
</Style>
TextBoxes will have to use Style="{StaticResource MyStyle}" to use this :
<Style x:Key="MyStyle" TargetType="{x:Type TextBox}">
<Setter Property="Foreground" Value="Red" />
</Style>