DockControllerBase.AddDocumentPanel(DocumentGroup, Uri) Method
Adds a new DocumentPanel to the specified DocumentGroup and loads the contents of a Window, Page or UserControl defined in the specified XAML into the DocumentPanel.
Namespace: DevExpress.Xpf.Docking
Assembly: DevExpress.Xpf.Docking.v14.2.dll
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
group | Document |
A Document |
uri | Uri | The uniform resource identifier (URI) of the XAML that defines a Window, Page or User |
#Returns
Type | Description |
---|---|
Document |
The created Document |
#Remarks
When the URI refers to a Window or Page, the AddDocumentPanel method loads the contents of the specified Window/Page. The Window/Page objects themselves, and their resources and event handlers are not loaded, and they will not be available via the inherited LayoutPanel.Control property.
When the URI refers to a UserControl, the UserControl itself is loaded. You can access the loaded UserControl via the inherited LayoutPanel.Control property.
NOTE
Loading the XAML file is delegated to the Application.
#Example
The following code adds a new DocumentPanel object to a DocumentGroup, and loads the content of the "ChildPage.xaml" into this panel:
DocumentPanel panel = dockLayoutManager1.DockController.AddDocumentPanel(
documentGroup1, new Uri(@"Layouts\ChildPage.xaml", UriKind.Relative));
panel.Caption = "Page 1";