コード例 #1
0
ファイル: DockHelper.cs プロジェクト: tickbh/TickUIEditor
        public static FloatWindow FloatWindowAtPoint(Point pt, DockPanel dockPanel)
        {
            if (!Win32Helper.IsRunningOnMono)
            {
                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 プロジェクト: tickbh/TickUIEditor
        public static DockPane PaneAtPoint(Point pt, DockPanel dockPanel)
        {
            if (!Win32Helper.IsRunningOnMono)
            {
                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);
        }