Example #1
0
        private KryptonDockingFloatingWindow CreateFloatingWindow(string name)
        {
            // Create a floatspace and floating window for hosting the floatspace
            KryptonDockingFloatspace     floatSpaceElement     = new KryptonDockingFloatspace("Floatspace");
            KryptonDockingFloatingWindow floatingWindowElement = new KryptonDockingFloatingWindow(name, OwnerForm, floatSpaceElement);

            floatingWindowElement.Disposed += OnDockingFloatingWindowDisposed;
            InternalAdd(floatingWindowElement);

            // Events are generated from the parent docking manager
            KryptonDockingManager dockingManager = DockingManager;

            if (dockingManager != null)
            {
                // Generate events so the floating window/dockspace appearance can be customized
                FloatingWindowEventArgs floatingWindowArgs = new FloatingWindowEventArgs(floatingWindowElement.FloatingWindow, floatingWindowElement);
                FloatspaceEventArgs     floatSpaceArgs     = new FloatspaceEventArgs(floatSpaceElement.FloatspaceControl, floatSpaceElement);
                dockingManager.RaiseFloatingWindowAdding(floatingWindowArgs);
                dockingManager.RaiseFloatspaceAdding(floatSpaceArgs);
            }

            return(floatingWindowElement);
        }