コード例 #1
0
ファイル: DockHelper.cs プロジェクト: xuanximoming/PIC
        public static FloatWindow FloatWindowAtPoint(Point pt, DockPanel dockPanel)
        {
            for (Control control = Win32Helper.ControlAtPoint(pt); control != null; control = control.Parent)
            {
                FloatWindow floatWindow = control as FloatWindow;
                if (floatWindow != null && floatWindow.DockPanel == dockPanel)
                {
                    return(floatWindow);
                }
            }

            return(null);
        }
コード例 #2
0
ファイル: DockHelper.cs プロジェクト: xuanximoming/PIC
        public static DockPane PaneAtPoint(Point pt, DockPanel dockPanel)
        {
            for (Control control = Win32Helper.ControlAtPoint(pt); control != null; control = control.Parent)
            {
                IDockContent content = control as IDockContent;
                if (content != null && content.DockHandler.DockPanel == dockPanel)
                {
                    return(content.DockHandler.Pane);
                }

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

            return(null);
        }