I try to modify the PaneToolWindow style (in the XamDockManager default style) but get no effects. The only thing that works is to put a PaneToolWindow style in the App resources.
Can someone confirm and/or explain why?
Thank you!
I didn't say that it wasn't used. It is used to affect the appearance of the floating tool windows in the xamDockManager - to be accurate it affects the look of the "non-client" area of those windows when the UseOsNonClientArea resolves to false (i.e. when the window is not letting the OS provide the non-client area).
You asked why it was not affecting the window when you put it into the Resources of the XamDockManager and that is what I was answering. It doesn't affect the floating windows because of how WPF resolves styles. Style resolution goes up the logical tree and the top level windows are separate so in the case of the xamDockManager the floating tool windows are not part of the logical tree of the xamDockManager. If they were you would get other sort of potential issues like routed events, inherited properties, etc. that then route through the xamDockManager and its ancestors and also at least in the past WPF has had issues when elements of different focus scopes were part of other logical trees. So just as you would have to put a Style for any window (even if you create a window and set its Owner to be another window) into the app.resources in order to affect the look of the window, you have to do that with the PaneToolWindow style. Alternatively you could hook the ToolWindowLoaded and add the Style into the Resources of the e.ToolWindow.
So what is the PaneToolWindow style in the XamDockManager for if it is not used in any circumstance?
Yes that is expected. The PaneToolWindow is hosted in a top level WPF Window (in a wpf app).