Back to Devexpress

DocumentPanel Class

wpf-devexpress-dot-xpf-dot-docking-8ab07167.md

latest8.5 KB
Original Source

DocumentPanel Class

A child panel in a DocumentGroup. The DocumentPanel supports the MDI and Tabbed UIs.

Namespace : DevExpress.Xpf.Docking

Assembly : DevExpress.Xpf.Docking.v25.2.dll

NuGet Package : DevExpress.Wpf.Docking

Declaration

csharp
public class DocumentPanel :
    LayoutPanel
vb
Public Class DocumentPanel
    Inherits LayoutPanel

The following members return DocumentPanel objects:

Remarks

Create DocumentPanels

View Example: Create a DocumentGroup with Two DocumentPanel Tabs

In XAML

The following code sample creates the DocumentGroup with two DocumentPanels inside:

xaml
<Window ...
  xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
  <dxdo:DockLayoutManager>
    <dxdo:LayoutGroup>
      <dxdo:DocumentGroup>
        <dxdo:DocumentPanel Caption="Document1"/>
        <dxdo:DocumentPanel Caption="Document2"/>
      </dxdo:DocumentGroup>
    </dxdo:LayoutGroup>
  </dxdo:DockLayoutManager>
</Window>

In Code

The following code sample creates the DocumentGroup with two DocumentPanels inside:

xaml
<Window ...
  xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
  <dxdo:DockLayoutManager x:Name="DockLayoutManager1">
    <dxdo:LayoutGroup x:Name="rootgroup">
  </dxdo:DockLayoutManager>
</Window>
csharp
DocumentGroup documentgroup = new DocumentGroup();
DockLayoutManager1.DockController.Dock(documentgroup, rootgroup, DockType.Fill);
DocumentPanel document1 = DockLayoutManager1.DockController.AddDocumentPanel(documentgroup);
document1.Caption = "Document1";
DocumentPanel document2 = DockLayoutManager1.DockController.AddDocumentPanel(documentgroup);
document2.Caption = "Document2";
DockLayoutManager1.DockController.Dock(document2, documentgroup, DockType.Fill);
vb
Dim documentgroup As DocumentGroup = New DocumentGroup()
DockLayoutManager1.DockController.Dock(documentgroup, rootgroup, DockType.Fill)
Dim document1 As DocumentPanel = DockLayoutManager1.DockController.AddDocumentPanel(documentgroup)
document1.Caption = "Document1"
Dim document2 As DocumentPanel = DockLayoutManager1.DockController.AddDocumentPanel(documentgroup)
document2.Caption = "Document2"
DockLayoutManager1.DockController.Dock(document2, documentgroup, DockType.Fill)

Tip

Refer to the DocumentGroup class for more information on how to customize DocumentPanels.

The following code snippets (auto-collected from DevExpress Examples) contain references to the DocumentPanel class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-dock-layout-manager-upgrade-layouts-between-versions/CS/MainWindow.xaml#L15

xml
<Window.Resources>
    <Style TargetType="dxdo:DocumentPanel">
        <Setter Property="MDISize" Value="200,200" />

wpf-docklayoutmanager-merge-bars-in-controls-that-support-automatic-merging/CS/WpfApplication1/MainWindow.xaml#L22

xml
<dxdo:DocumentGroup x:Name="ChildDocumentGroup" MDIStyle="Tabbed" DestroyOnClosingChildren="False">
    <dxdo:DocumentPanel x:Name="Document1" Caption="DocumentPanel1" MDISize="800,600">
        <Grid>

wpf-dock-layout-manager-limit-layout-group-customization-at-runtime/CS/DXDockingForLayoutPurposes/MainWindow.xaml#L19

xml
<dxd:LayoutGroup>
    <dxd:DocumentPanel>
        <dxd:DockLayoutManager>

wpf-docklayoutmanager-load-an-external-window-or-usercontrol-into-a-documentpanel/CS/DocumentPanel_Content/MainWindow.xaml#L35

xml
<dxdo:DocumentGroup x:Name="documentGroup1" SelectedTabIndex="1" DestroyOnClosingChildren="False" MDIStyle="MDI">
    <dxdo:DocumentPanel x:Name="docPanel1" Caption="Panel 1" MDISize="300,250"/>
    <dxdo:DocumentPanel x:Name="docPanel2" Caption="Panel 2" MDILocation="100,100" MDISize="300,250" Content="{dxdo:RelativeUri UriString=/DocumentPanel_Content;component/CustomWindows/MyWindow.xaml}"/>

wpf-docklayoutmanager-merge-ribbon-controls/CS/WpfApplication1/MainWindow.xaml#L41

xml
<dxdo:DocumentGroup x:Name="ChildDocumentGroup" MDIStyle="Tabbed" DestroyOnClosingChildren="False">
    <dxdo:DocumentPanel x:Name="Document1" Caption="Document1" MDISize="800,600">
        <Grid>

Inheritance

Show 12 items

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control DevExpress.Xpf.Docking.psvFrameworkElement BaseLayoutItem ContentItem LayoutPanel DocumentPanel

See Also

DocumentPanel Members

DocumentGroup

DevExpress.Xpf.Docking Namespace