NativeMdiView Class
Presents MDI child windows as a native MDI.
Namespace: DevExpress.XtraBars.Docking2010.Views.NativeMdi
Assembly: DevExpress.XtraBars.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Remarks
MDI child windows can be presented by a DocumentManager either as a native MDI or tabbed UI. To enable a native MDI, create a NativeMdiView
object and assign it to the DocumentManager.View property. To use the tabbed UI, create a TabbedView object and assign it to the DocumentManager.View property.
Operations on documents in a NativeMdiView are encapsulated by a INativeMdiViewController object accessible via the NativeMdiView.Controller property.
Example
This example shows how to enable a native MDI for a DocumentManager where MDI child windows are presented as regular windows within a container.
//Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraBars.Docking2010;
using DevExpress.XtraBars.Docking2010.Views.NativeMdi;
using DevExpress.XtraEditors;
namespace DocumentManager_NativeMDI {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
int childCount = 0;
private void Form1_Load(object sender, EventArgs e) {
CreateDocumentManager();
for(int i = 0; i < 3; i++) {
AddChild();
}
}
void CreateDocumentManager() {
DocumentManager dm = new DocumentManager(components);
dm.MdiParent = this;
dm.View = new NativeMdiView();
}
void AddChild() {
Form childForm = null;
childForm = new Form();
childForm.Text = "Child Form " + (++childCount);
SimpleButton btn = new SimpleButton();
btn.Text = "Button " + childCount;
btn.Parent = childForm;
childForm.MdiParent = this;
childForm.Show();
}
}
}