Category / Section
How to change MDI Window State in DocumentContainer?
1 min read
MDI Window state can be changed by “MDIWindowState” Property. MDI Window states are Maximized, Minimized and Normal.
The same has been explained in the following code snippet:
XAML:
//Code explains how to set MDIWindow State <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="DocumentContainer.MainWindow" Title="MainWindow" Height="350" Width="525"> <Grid> <syncfusion:DocumentContainer Width="Auto" Height="Auto" Mode="MDI" > <FlowDocumentScrollViewer Width="Auto" Height="Auto" syncfusion:DocumentContainer.Header="Features" syncfusion:DocumentContainer.MDIWindowState="Maximized" syncfusion:DocumentContainer.MDIBounds="0,0,300,300"> <FlowDocument> <Paragraph>A DocumentContainer is a control that is used for holdingthe documents, controls and panels inside it. Using a DocumentContainer you can create interfaces like MDI and TDI, which can make the end-user to create easily navigable applications. This help section will demonstrate all the important properties of the DocumentContainer that will help the end-user to know about all the available features. </Paragraph></FlowDocument> </FlowDocumentScrollViewer> </syncfusion:DocumentContainer> </Grid> </Window>
C#:
//Code explains how to set MDI Window State in DocumentContainer namespace DocumentContainer1 { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); DocumentContainer.SetMDIWindowState(Document, MDIWindowState.Maximized); } } }
Output:
Maximized:
Minimized:
Normal: