Skip to main content
A newer version of this page is available. .

TabbedView Class

Presents MDI child windows as a tabbed UI.

Namespace: DevExpress.XtraBars.Docking2010.Views.Tabbed

Assembly: DevExpress.XtraBars.v18.1.dll

Declaration

public class TabbedView :
    BaseView,
    IThumbnailViewClient,
    IFreeLayoutView,
    ISupportBatchUpdate

Remarks

MDI child windows can be presented by a DocumentManager either as a native MDI or tabbed UI. To use the tabbed UI, create a TabbedView object and assign it to the DocumentManager.View property. To enable a native MDI, create a NativeMdiView object and assign it to the DocumentManager.View property.

Documents in a TabbedView are displayed as tabs. You can split the View’s area vertically or horizontally into document groups. In code, you can create a new group via the ITabbedViewController.CreateNewDocumentGroup method accessible via the View’s Controller object. An end-user can split the area via a document’s context menu or drag-and-drop.

When you do not create extra groups, there is one default group that displays all documents. When document groups are created, they are added to the TabbedView.DocumentGroups collection.

The number of documents displayed simultaneously in a group can be limited via the IDocumentGroupProperties.MaxDocuments and IDocumentGroupDefaultProperties.MaxDocuments properties.

Example

This example shows how to enable a tabbed UI for a DocumentManager where MDI child windows are presented as tab pages.

TabbedUI_ex

using System;
using System.Windows.Forms;
using DevExpress.XtraBars.Docking2010;
using DevExpress.XtraBars.Docking2010.Views.Tabbed;
using DevExpress.XtraEditors;

namespace DocumentManager_TabbedUI {
    public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
        }
        void Form1_Load(object sender, EventArgs e) {
            AddDocumentManager();
            for(int i = 0; i < 3; i++) {
                AddChildForm();
            }
        }
        void AddDocumentManager() {
            DocumentManager manager = new DocumentManager();
            manager.MdiParent = this;
            manager.View = new TabbedView();
        }
        int count;
        void AddChildForm() {
            Form childForm = new Form();
            childForm.Text = "Child Form " + (++count).ToString();

            SimpleButton btn = new SimpleButton();
            btn.Text = "Button " + count.ToString();
            btn.Parent = childForm;

            childForm.MdiParent = this;
            childForm.Show();
        }
    }
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the TabbedView 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.

See Also