Infragistics3.Wpf.DockManager.v8.1
TabGroupPane Class
See Also  Members   Example 
Infragistics.Windows.DockManager Namespace : TabGroupPane Class

A custom group pane used in a XamDockManager that can display one or more ContentPane instances as tab items.

Syntax

Visual Basic (Declaration) 
Public Class TabGroupPane 
   Inherits TabControl
   Implements IContentPaneContainer, IPaneContainer, IGeneratorHost 
C# 
public class TabGroupPane : TabControl, IContentPaneContainer, IPaneContainer, IGeneratorHost  

Example

This sample demonstates how to create a TabGroupPane within a docked SplitPane to create a docked tab group and another within the DocumentContentHost to create a tabbed document group.

Visual BasicCopy Code
Imports Infragistics.Windows.DockManager

Private Sub CreateTabGroupPane(ByVal dockManager As XamDockManager)
    Dim dockedSplit As New SplitPane()
    dockedSplit.SplitterOrientation = Orientation.Horizontal
    XamDockManager.SetInitialLocation(dockedSplit, InitialPaneLocation.DockedRight)

    ' A TabGroupPane can be hosted within a SplitPane
    Dim tgpDocked As New TabGroupPane()

    Dim cpDockedTab1 As New ContentPane()
    cpDockedTab1.Header = "Solution Explorer"
    cpDockedTab1.Content = New TreeView()
    tgpDocked.Items.Add(cpDockedTab1)

    Dim cpDockedTab2 As New ContentPane()
    cpDockedTab2.Header = "Class View"
    cpDockedTab2.Content = New TreeView()
    tgpDocked.Items.Add(cpDockedTab2)
    dockedSplit.Panes.Add(tgpDocked)

    Dim cpRightBottom As New ContentPane()
    cpRightBottom.Header = "Properties"
    cpRightBottom.Content = New ListView()
    dockedSplit.Panes.Add(cpRightBottom)

    dockManager.Panes.Add(dockedSplit)

    Dim dch As New DocumentContentHost()
    Dim dchSplit As New SplitPane()

    ' TabGroupPane and SplitPane are the only element
    ' types allowed within a SplitPane in the
    ' DocumentContentHost
    Dim tgpDch1 As New TabGroupPane()
    Dim tgpDchTab1 As New ContentPane()
    tgpDchTab1.Header = "File 1"
    tgpDchTab1.Content = New RichTextBox()
    tgpDch1.Items.Add(tgpDchTab1)
    dchSplit.Panes.Add(tgpDch1)

    Dim tgpDch2 As New TabGroupPane()
    Dim tgpDchTab2 As New ContentPane()
    tgpDchTab2.Header = "File 2"
    tgpDchTab2.Content = New RichTextBox()
    tgpDch2.Items.Add(tgpDchTab2)
    dchSplit.Panes.Add(tgpDch2)

    dch.Panes.Add(dchSplit)

    dockManager.Content = dch
End Sub
C#Copy Code
using Infragistics.Windows.DockManager;

private void CreateTabGroupPane(XamDockManager dockManager)
{
   SplitPane dockedSplit =
new SplitPane();
   dockedSplit.SplitterOrientation = Orientation.Horizontal;
   XamDockManager.SetInitialLocation(dockedSplit, InitialPaneLocation.DockedRight);

   
// A TabGroupPane can be hosted within a SplitPane
   
TabGroupPane tgpDocked = new TabGroupPane();

   ContentPane cpDockedTab1 =
new ContentPane();
   cpDockedTab1.Header =
"Solution Explorer";
   cpDockedTab1.Content =
new TreeView();
   tgpDocked.Items.Add(cpDockedTab1);
   
   ContentPane cpDockedTab2 =
new ContentPane();
   cpDockedTab2.Header =
"Class View";
   cpDockedTab2.Content =
new TreeView();
   tgpDocked.Items.Add(cpDockedTab2);
   dockedSplit.Panes.Add(tgpDocked);

   ContentPane cpRightBottom =
new ContentPane();
   cpRightBottom.Header =
"Properties";
   cpRightBottom.Content =
new ListView();
   dockedSplit.Panes.Add(cpRightBottom);

   dockManager.Panes.Add(dockedSplit);

   DocumentContentHost dch =
new DocumentContentHost();
   SplitPane dchSplit =
new SplitPane();

   
// TabGroupPane and SplitPane are the only element
   
// types allowed within a SplitPane in the
   
// DocumentContentHost
   
TabGroupPane tgpDch1 = new TabGroupPane();
   ContentPane tgpDchTab1 =
new ContentPane();
   tgpDchTab1.Header =
"File 1";
   tgpDchTab1.Content =
new RichTextBox();
   tgpDch1.Items.Add(tgpDchTab1);
   dchSplit.Panes.Add(tgpDch1);

   TabGroupPane tgpDch2 =
new TabGroupPane();
   ContentPane tgpDchTab2 =
new ContentPane();
   tgpDchTab2.Header =
"File 2";
   tgpDchTab2.Content =
new RichTextBox();
   tgpDch2.Items.Add(tgpDchTab2);
   dchSplit.Panes.Add(tgpDch2);

   dch.Panes.Add(dchSplit);

   dockManager.Content = dch;
}
XAMLCopy Code
<igDock:XamDockManager>
    
<igDock:XamDockManager.Panes>
        
<igDock:SplitPane igDock:XamDockManager.InitialLocation="DockedRight"
                          
SplitterOrientation="Horizontal">
            
<!-- A TabGroupPane can be hosted within a SplitPane -->
            
<igDock:TabGroupPane SelectedIndex="1">
                
<igDock:ContentPane Header="Solution Explorer">
                    
<TreeView />
                
</igDock:ContentPane>
                
<igDock:ContentPane Header="Class View">
                    
<TreeView />
                
</igDock:ContentPane>
            
</igDock:TabGroupPane>
            
<igDock:ContentPane Header="Properties">
                
<ListView />
            
</igDock:ContentPane>
        
</igDock:SplitPane>
    
</igDock:XamDockManager.Panes>
    
<igDock:DocumentContentHost>
        
<igDock:SplitPane SplitterOrientation="Vertical">
            
<!-- TabGroupPane and SplitPane are the only element 
                 types allowed within a SplitPane in the 
                 DocumentContentHost
-->
            
<igDock:TabGroupPane>
                
<igDock:ContentPane Header="File 1">
                    
<RichTextBox />
                
</igDock:ContentPane>
            
</igDock:TabGroupPane>
            
<igDock:TabGroupPane>
                
<igDock:ContentPane Header="File 2">
                    
<RichTextBox />
                
</igDock:ContentPane>
            
</igDock:TabGroupPane>
        
</igDock:SplitPane>
    
</igDock:DocumentContentHost>
</igDock:XamDockManager>

See Also