I have a control with a style defined in a separate resource dictionary and use the generic.xaml magic to apply it.
If I understand the lookup mechanism described on msdn (https://msdn.microsoft.com/de-de/library/ms750613%28v=vs.110%29.aspx), the generic.xaml is used after the application resources, but adding a style for MyWindow will result in the style from generic.xaml + the style defined in App.xaml.
Here is my code:
Generic.xaml
<ResourceDictionary ...>
<Style TargetType="{x:Type test:MyWindow}" BasedOn="{StaticResource ResourceKey={x:Type Window}}">
<Setter Property="Background" Value="Gainsboro" />
<Setter Property="Title" Value="Default!" />
</Style>
</ResourceDictionary>
App.xaml
<Application.Resources>
<ResourceDictionary>
<Style TargetType="{x:Type test:MyWindow}" BasedOn="{StaticResource ResourceKey={x:Type Window}}">
<Setter Property="Background" Value="HotPink" />
</Style>
</Application.Resources>
The window will have a pink background (from the application.resource style) and "Default!" as title from the generic.xaml style.
Why doesn't wpf stop searching for a style at the application level?