'Declaration Public Class DocumentContentHost Inherits System.Windows.Controls.Control
public class DocumentContentHost : System.Windows.Controls.Control
Imports Infragistics.Windows.DockManager Private Sub InitializeDmWithDCH(ByVal dockManager As XamDockManager) ' The XamDockManager is a content control and as such ' can contain any content but you can use a ' DocumentContentHost to provide VS style tabbed ' documents which can participate in the dragging ' and pane navigator of the xamdockmanager Dim dch As New DocumentContentHost() Dim rootSplit As New SplitPane() rootSplit.SplitterOrientation = Orientation.Vertical Dim tgpRoot As New TabGroupPane() Dim cpFile1 As New ContentPane() cpFile1.Header = "File 1" cpFile1.Content = New RichTextBox() tgpRoot.Items.Add(cpFile1) Dim cpFile2 As New ContentPane() cpFile2.Header = "File 2" cpFile2.Content = New RichTextBox() tgpRoot.Items.Add(cpFile2) rootSplit.Panes.Add(tgpRoot) ' You can nest SplitPanes within the DCH ' to create nested tab groups. This split ' will be to the right of the tab group ' defined above. Dim nestedSplit As New SplitPane() nestedSplit.SplitterOrientation = Orientation.Horizontal Dim tgpNested1 As New TabGroupPane() Dim cpFile3 As New ContentPane() cpFile3.Header = "File 3" cpFile3.Content = New RichTextBox() tgpNested1.Items.Add(cpFile3) nestedSplit.Panes.Add(tgpNested1) Dim tgpNested2 As New TabGroupPane() Dim cpFile4 As New ContentPane() cpFile4.Header = "File 4" cpFile4.Content = New RichTextBox() tgpNested2.Items.Add(cpFile4) nestedSplit.Panes.Add(tgpNested2) rootSplit.Panes.Add(nestedSplit) dch.Panes.Add(rootSplit) dockManager.Content = dch End Sub
using Infragistics.Windows.DockManager; private void InitializeDmWithDCH(XamDockManager dockManager) { // The XamDockManager is a content control and as such // can contain any content but you can use a // DocumentContentHost to provide VS style tabbed // documents which can participate in the dragging // and pane navigator of the xamdockmanager DocumentContentHost dch = new DocumentContentHost(); SplitPane rootSplit = new SplitPane(); rootSplit.SplitterOrientation = Orientation.Vertical; TabGroupPane tgpRoot = new TabGroupPane(); ContentPane cpFile1 = new ContentPane(); cpFile1.Header = "File 1"; cpFile1.Content = new RichTextBox(); tgpRoot.Items.Add(cpFile1); ContentPane cpFile2 = new ContentPane(); cpFile2.Header = "File 2"; cpFile2.Content = new RichTextBox(); tgpRoot.Items.Add(cpFile2); rootSplit.Panes.Add(tgpRoot); // You can nest SplitPanes within the DCH // to create nested tab groups. This split // will be to the right of the tab group // defined above. SplitPane nestedSplit = new SplitPane(); nestedSplit.SplitterOrientation = Orientation.Horizontal; TabGroupPane tgpNested1 = new TabGroupPane(); ContentPane cpFile3 = new ContentPane(); cpFile3.Header = "File 3"; cpFile3.Content = new RichTextBox(); tgpNested1.Items.Add(cpFile3); nestedSplit.Panes.Add(tgpNested1); TabGroupPane tgpNested2 = new TabGroupPane(); ContentPane cpFile4 = new ContentPane(); cpFile4.Header = "File 4"; cpFile4.Content = new RichTextBox(); tgpNested2.Items.Add(cpFile4); nestedSplit.Panes.Add(tgpNested2); rootSplit.Panes.Add(nestedSplit); dch.Panes.Add(rootSplit); dockManager.Content = dch; }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2