Hi,
I'm using the XamDockManger with DocakbleFloating panes. I have two requirements,
The only way I've found to achieve point 1 (quickly and easily) is to apply a Theme to the XamDockManager, currently I'm using RoyalLight. This removes the default ToolWindowHostWindow toolbar containing the red close button.
The only way I can find to achieve point 2 easily is using a ResourceWasher as outlined in the XamDockManager -> Creating Custom Themes (Advanced) sample. However, in order to use a ResourceWasher you can't explicitly set a Theme on the XamDockManager, removing the Theme gives me my custom colours but the default Toolbar is now present on my DockableFloating panes.
Can you tell me how to achieve both of these requirements at once please? I haven't attached a sample solution, if you go to the XamDockManager -> Creating Custom Themes (Advanced) sample and float one of the panes you can see the behaviour I've outlined above.
Thanks
Hello Neil,
Try hooking the Dockmanager's ToolWindowLoaded event and set
e.Window.UseOsNonClientArea = false;
By default the ToolWindow let's the OS provide the non-client area and therefore the chrome from the ToolWindow template won't be used.
Let me know if you have any questions.
Hi Michael,
Thanks for the response. I've tried your suggestion but it doesn't seem to change the behaviour I was seeing before. Here's what I can see when I run my test app:
I'm loading the DockManagerRoyalLight theme in my main window's MergedDictionaries. Alongside this I am specifying a ResourceWasher to turn the ThemeColor blue. I have no explicit Theme setting on the XamDockManager itself.
The theme is applied to the docked panes but the floating ones don't seem to have any knowledge of the selected theme at all. As you can also see, the OS client area is still visible despite me explicitly handling the loaded event as you outlined above.
Is the default behaviour for floating panes to have a different style to their parent dock manager? I've tried to attach a zip of my sample solution but the post fails when I have it attached. Let me know the best way of providing this if you want to look at all of my code.
Thanks Michael, placing the styles in app.xaml is the part that was missing.
Please provide a sample I'd like to review your styles.
Note, Styles/resourcewasher/etc in the xamdockmanager's resources or even in the resources of the window containing the xamdockmanager will not affect the floating windows since they are separate top level windows. Try coping your styles/resourcewashers into the app.xaml.