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); }
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); }