Articles in this section
Category / Section

How to setting Document Mode in Document Container Control?

1 min read

 

Document in DocumentContainer can be displayed as TDI (Tabbed Document Interface) and MDI (Multiple Document Interface). Display mode of Document can be changed by “Mode” property of DocumentContainer.

The same has been explained in the following code snippet:

XAML:

//Code Explains how to set mode in Document Container control 
<Window
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:syncfusion="http://schemas.syncfusion.com/wpf"   x:Class="DocumentContainer1.MainWindow"
Title="MainWindow" Height="350" Width="525">
<Grid>
 <syncfusion:DocumentContainer Name="DockContainer" Width="Auto" Height="Auto" Mode="TDI" >
 <FlowDocumentScrollViewer Name="Document" Width="Auto" Height="Auto" syncfusion:DocumentContainer.Header="Features"  syncfusion:DocumentContainer.MDIBounds="0,0,300,300">
<FlowDocument>
<Paragraph>A DocumentContainer is a control that is used for holding the documents, controls and panels inside it.</Paragraph></FlowDocument>
</FlowDocumentScrollViewer><FlowDocumentScrollViewer Name="Document1" syncfusion:DocumentContainer.Header="Document"  syncfusion:DocumentContainer.MDIBounds="0,0,300,300">
<FlowDocument><Paragraph>Welcome to Syncfusion</Paragraph</FlowDocument>
</FlowDocumentScrollViewer>
</syncfusion:DocumentContainer>
</Grid>
</Window>
 

 C#:

//Code explains how to set mode property in Document Container
namespace DocumentContainer1
{
public partial class MainWindow : Window

{
public MainWindow()
 {
 InitializeComponent();
DockContainer.Mode = DocumentContainerMode.MDI;
}
}
}
 

Output:

TDI (Tabbed Document Interface)

      C:\Users\Ashok.Murugesan\Desktop\Switchmode\TDI.png

MDI (Multiple Document Interface)

      C:\Users\Ashok.Murugesan\Desktop\Switchmode\minimizedoc.png

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied