Back to Devexpress

DocumentPanel.MDISize Attached Property

wpf-devexpress-dot-xpf-dot-docking-dot-documentpanel.md

latest4.6 KB
Original Source

DocumentPanel.MDISize Attached Property

Gets or sets the size of an MDI child panel. This property is in effect when the group’s DocumentGroup.MDIStyle property is set to MDI. This is an attached property.

Namespace : DevExpress.Xpf.Docking

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

NuGet Package : DevExpress.Wpf.Docking

Declaration

See GetMDISize(DependencyObject) and SetMDISize(DependencyObject, Size).

Returns

TypeDescription
Size

A Size structure that specifies the size of an MDI child panel.

|

Remarks

The following code sample specifies the child panels’ MDILocation and MDISize properties:

xaml
<dx:ThemedWindow 
  ...
  xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
  xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
  <Grid>  
    <dxdo:DockLayoutManager>
      <dxdo:LayoutGroup>
        <dxdo:DocumentGroup>
          <dxdo:DocumentPanel Caption="Document1" MDILocation="10,20" MDISize="300,200"/>
          <dxdo:DocumentPanel Caption="Document2" MDILocation="350,100" MDISize="400,400"/>
        </dxdo:DocumentGroup>
      </dxdo:LayoutGroup>
    </dxdo:DockLayoutManager>
  </Grid>
</dx:ThemedWindow>

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

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-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-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>

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

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

See Also

DocumentPanel Class

DocumentPanel Members

DevExpress.Xpf.Docking Namespace