Setting MDIBounds in WPF Tabbed MDI Form

18 Nov 20181 minute to read

The MDIBounds attached property helps the WPF Tabbed MDI Form place its elements within the container in MDI mode. The property is set on each child element, rather than to the container itself.

The general syntax of the MDIBounds attached property is given below.

Syncfusion:DocumentContainer.MDIBounds="x,y,width,height"

where:

  • The first two values (x and y) stand for the X and Y coordinates of the MDI bounds.
  • The next two values (width and height) stand for the width and height of the element in the WPF Tabbed MDI Form.

To set the MDI bounds, use the following code snippet.

<syncfusion:DocumentContainer Name="DocContainer" Mode="MDI">
    <FlowDocumentScrollViewer syncfusion:DocumentContainer.MDIBounds="0,0,200,300" />
    <!-- additional child windows -->
</syncfusion:DocumentContainer>
FlowDocumentScrollViewer flow = new FlowDocumentScrollViewer();
DocumentContainer.SetMDIBounds(flow, new Rect(0, 0, 200, 300));
DocContainer.Items.Add(flow);

DocumentContainer with a child window placed using MDIBounds