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
460
Can you customize the tab layout when mutliple things are docked together
posted

I have an app that will have many floatable windows.  If the user docks a bunch of them together, can I customize the way the tabs appear for each window.  I would like to have them form rows of tabs so that all of the tabs are visable.  Is this possible?

 

Thanks

Parents
  • 54937
    Offline posted

    You can create a style for the TabGroupPane and set its ItemsPanel to a panel that will provide a multi row arrangement.

        <Window.Resources>
            <Style TargetType="{x:Type igDock:TabGroupPane}" x:Key="floatingTabs">
                <Setter Property="ItemsPanel">
                    <Setter.Value>
                        <ItemsPanelTemplate>
                            <igWindows:TabItemPanel TabLayoutStyle="MultiRowAutoSize" />
                        </ItemsPanelTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

    Then you'll have to hook the ToolWindowLoaded event and put this Style into the Resources of the ToolWindow. e.g.

            private void XamDockManager_ToolWindowLoaded(object sender, Infragistics.Windows.DockManager.Events.PaneToolWindowEventArgs e)
            {
                Style tabStyle = this.FindResource("floatingTabs"as Style;
                e.Window.Resources.Add(typeof(TabGroupPane), tabStyle);
            }

    Note, this provides a local style that will take precedence over any style for TabGroupPane that would have come from the Theme property. Currently the only Style defined for the TabGroupPane is in the generic theme so this won't be a problem now but I thought it should be mentioned since that could theoretically happen in the future.

Reply Children