Ejemplo n.º 1
0
        public static DockPane PaneAtPoint(Point pt, DockContainer dockPanel)
        {
            for (Control control = Win32Helper.ControlAtPoint(pt); control != null; control = control.Parent)
            {
                IDockableWindow content = control as IDockableWindow;
                if (content != null && content.DockHandler.DockPanel == dockPanel)
                {
                    return(content.DockHandler.Pane);
                }

                DockPane pane = control as DockPane;
                if (pane != null && pane.DockPanel == dockPanel)
                {
                    return(control as DockPane);
                }
            }

            return(null);
        }