Imports Infragistics.Windows.DockManager ' this sample assumes you have a XamDockManager whose Content ' is set to a DocumentContentHost. calling AddDocument when ' the dockmanager is not using a DocumentContentHost will ' result in an exception Private Sub btnAddDocument_Click(ByVal sender As Object, ByVal e As RoutedEventArgs) Dim header As Object = "New File" Dim content As Object = New RichTextBox() ' the AddDocument method will create a new ContentPane for ' the given header & content and put that content pane in ' the tabgrouppane containing the active pane or a new ' tabgrouppane if there aren't any available Dim newDocument As ContentPane = Me.dmForAddDocument.AddDocument(header, content) newDocument.AllowDocking = False newDocument.AllowFloatingOnly = False ' the adddocument method doesn't automatically activate the pane ' in case you wanted to add multiple panes newDocument.Activate() End Sub
using Infragistics.Windows.DockManager; // this sample assumes you have a XamDockManager whose Content // is set to a DocumentContentHost. calling AddDocument when // the dockmanager is not using a DocumentContentHost will // result in an exception private void btnAddDocument_Click(object sender, RoutedEventArgs e) { object header = "New File"; object content = new RichTextBox(); // the AddDocument method will create a new ContentPane for // the given header & content and put that content pane in // the tabgrouppane containing the active pane or a new // tabgrouppane if there aren't any available ContentPane newDocument = this.dmForAddDocument.AddDocument(header, content); newDocument.AllowDocking = false; newDocument.AllowFloatingOnly = false; // the adddocument method doesn't automatically activate the pane // in case you wanted to add multiple panes newDocument.Activate(); }
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