setting mode for document container in WPF Tabbed MDI Form

7 May 20211 minute to read

Document Container supports two important modes which are listed below.

  • TDI - Tabbed Document Interface
  • MDI - Multiple Document Interface

To set the Document Container in TDI mode, use the following code snippet.

<!-- Adding Document Container -->
<syncfusion:DocumentContainer Name="DocContainer" Mode="TDI">…....…....
</syncfusion:DocumentContainer>
//Creating instance of Document ContainerDocumentContainer DocContainer = new DocumentContainer();
//Set mode as TDIDocContainer.Mode = DocumentContainerMode.TDI;….......….......
//Adding control to window this. Content = DocContainer;

The following is the screen shot of a document container, which is in TDI mode.

Setting-Mode-for-Document-Container_img1

To set the Document Container in MDI mode, use the following code snippet.

  • XAML
  • <!-- Adding Document Container -->
    <syncfusion:DocumentContainer Name="DocContainer" Mode="MDI">  …....  …....
    </syncfusion:DocumentContainer>
  • C#
  • //Creating instance of Document Container
    DocumentContainer DocContainer = new DocumentContainer();
    //Set mode as MDIDocContainer.
    Mode = DocumentContainerMode.MDI;..............
    //Adding control to window this.
    Content = DocContainer;

    The following screen shot shows the document container in MDI mode.

    Setting-Mode-for-Document-Container_img2