Example #1
0
        public void DisplayWindow(ISmartWindow window, WindowPosition position, params object[] options)
        {
            if (position == null || position.DockStyle == DockStyle.Fill)
            {
                DisplayWindow(window);
                return;
            }
            if ((window as DockWindow).DockState == DockState.Hidden)
            {
                (window as DockWindow).DockState = DockState.Docked;
                return;
            }
            if (position.DockStyle == DockStyle.None)
            {
                if (options != null && options.Length > 0)
                {
                    Rectangle rect = (Rectangle)options[0];
                    _radDock.FloatWindow(window as DockWindow, rect);
                }
                else
                {
                    _radDock.FloatWindow(window as DockWindow);
                }
                return;
            }
            DockPosition dockPosition = GetDockPosition(position);

            if (position.IsSharePanel)
            {
                DockWindow edgeDockwindow = GetEdgeDockwindow(dockPosition);
                if (edgeDockwindow == null)
                {
                    _radDock.DockWindow(window as DockWindow, dockPosition);
                    _edgeDockwindows.Add((DockPosition)dockPosition, window as DockWindow);
                }
                else
                {
                    _edgeDockwindows.Remove(dockPosition);
                    _edgeDockwindows.Add(dockPosition, window as DockWindow);
                    _radDock.DockWindow(window as DockWindow, edgeDockwindow.DockTabStrip, DockPosition.Top);
                }
            }
            else
            {
                _radDock.DockWindow(window as DockWindow, dockPosition);
            }
        }
Example #2
0
                public override object Execute(params object[] settings)
                {
                    RadDock dock = settings[0] as RadDock;

                    Debug.Assert(dock != null, "Invalid execute parameter!");
                    ToolWindow toolWindow = dock.ActiveWindow as ToolWindow;

                    if (toolWindow != null)
                    {
                        dock.FloatWindow(toolWindow);
                    }
                    return(base.Execute(settings));
                }