NativeMdiView Class
Presents MDI child windows as a native MDI.
Namespace: DevExpress.XtraBars.Docking2010.Views.NativeMdi
Assembly: DevExpress.XtraBars.v18.1.dll
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.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-enable-native-mdi-in-document-manager-e3246
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();
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();
}
}
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the NativeMdiView class.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.