A newer version of this page is available. Switch to the current version.

XtraTabbedMdiManager.FloatMDIChildDragging Event

Fires when dragging a floating page. Allows you to implement the drag-and-drop of child floating pages to another XtraTabbedMdiManager.

Namespace: DevExpress.XtraTabbedMdi

Assembly: DevExpress.XtraBars.v19.1.dll


public event FloatMDIChildDraggingEventHandler FloatMDIChildDragging

Event Data

The FloatMDIChildDragging event's data class is DevExpress.XtraTabbedMdi.FloatMDIChildDraggingEventArgs.


The FloatMDIChildDragging event allows you to implement the drag-and-drop of child floating pages to another XtraTabbedMdiManager. This can be accomplished by adding a target XtraTabbedMdiManager object to the event’s e.Targets collection. This collection contains XtraTabbedMdiManager objects that can accept the currently dragged floating page.

When a floating page is dropped over a XtraTabbedMdiManager that is found in the e.Targets collection, the page will automatically be docked to this XtraTabbedMdiManager.


This example demonstrates how to use the XtraTabbedMDIManager.FloatMDIChildDragging event to implement drag-and-drop of MDI children between different XtraTabbedMDIManagers.

using System;
using System.Collections.Generic;
using DevExpress.Utils;
using DevExpress.XtraEditors;
using DevExpress.XtraTabbedMdi;

namespace DevExpress.Samples.DocumentSelector {
    public partial class MainForm : XtraForm {
        static int index = 0;
        public MainForm(StartForm owner) {
            Owner = owner;
            Text += index.ToString();

            /*** Floating options ***/
            xtraTabbedMdiManager1.FloatOnDoubleClick = DevExpress.Utils.DefaultBoolean.True;
            xtraTabbedMdiManager1.FloatOnDrag = DevExpress.Utils.DefaultBoolean.True;
            xtraTabbedMdiManager1.FloatPageDragMode = FloatPageDragMode.Preview;
            /*** To Show form Icons in page headers ***/
            xtraTabbedMdiManager1.UseFormIconAsPageImage = DefaultBoolean.True;

            xtraTabbedMdiManager1.BeginFloating += xtraTabbedMdiManager1_BeginFloating;
            xtraTabbedMdiManager1.FloatMDIChildDragging += xtraTabbedMdiManager1_FloatMDIChildDragging;
        protected override void OnClosed(EventArgs e) {
        void xtraTabbedMdiManager1_FloatMDIChildDragging(object sender, FloatMDIChildDraggingEventArgs e) {
             * To allow an XtraTabbedMdiManager to accept a dragged panel, 
             * the manager needs to be added to the e.Targets collection.
            IEnumerable<XtraTabbedMdiManager> dropTargets = ((StartForm)Owner).GetManagers();
            foreach(XtraTabbedMdiManager manager in dropTargets) 
        void xtraTabbedMdiManager1_BeginFloating(object sender, FloatingCancelEventArgs e) {
            e.Cancel = false; // Allow all tab pages to be dragged away from XTraTabbedMDIManager
        void Form1_Load(object sender, EventArgs e) {
            if(index % 2 == 0) {
                AddChild("Recent", "Shows the recently viewed photos");
                AddChild("Favourites", "My favourite photos");
            else {
                AddChild("Published", "These photos are published in my blog");
                AddChild("Unsorted", "Not reviewed photos");
        public void AddChild(string category, string tag) {
            ChildForm categoryForm = new ChildForm();
            categoryForm.Text = category;
            categoryForm.MdiParent = this;
            categoryForm.Tag = tag;
See Also