As test I changed the style of few elements by adding a new style in App.xaml (Application.Resources) and it is over writing a style defined in a window.
Now, I am wondering if there is any exception in this? meaning that in a WPF application (let’s assume we have 3 windows w1, w2, w3) can we apply the style defined in app.xaml only to windows 1 and 2 and then 3 keep its own style intact from its local ResourceDictionary block or any other source?
There are two approaches you can use:
App.xaml. The styles used is determined by walking up the tree in Xaml until an appropriate style is found. If Window3 has it’s own style, it will “override” the style in the application’s xaml files.