Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
655
Apply styles on TabGroups
posted

I have adjusted how the tab groups look in my Dock manager (i want the tabs always at the top, instead of the bottom for one example), so for any tab groups in my Shell.xaml i have adjusted the Style attribute to point to the new StaticResource style.

This works great but im still missing one scenario. If the user creates a tab group at runtime by moving windows around its getting the default style, is there a way i can enforce custom styles for newly created items?

Parents
  • 54937
    Offline posted

    If you removed the x:Key from the Style then it would affect all TabGroups within the xamDockManager although it still would not affect the TabGroups within floating panes since those are in separate WPF Windows. To handle that you would either need to put the xaml with the style into the application's resources or handle the ToolWindowLoaded and add the style to the e.ToolWindow.Resources. One other alternative is to create a derived xamDockManager and override the CreateTabGroupPane method and set the Style on the TabGroupPane you return.

Reply Children