ControlAtPoint() static private méthode

static private ControlAtPoint ( Point pt ) : Control
pt Point
Résultat System.Windows.Forms.Control
Exemple #1
0
 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);
 }
Exemple #2
0
        public static FloatWindow FloatWindowAtPoint(Point pt, DockPanel dockPanel)
        {
            if (!Win32Helper.IsRunningOnMono)
            {
                for (Control control = Win32Helper.ControlAtPoint(pt); control != null; control = control.Parent)
                {
                    if (control is FloatWindow floatWindow && floatWindow.DockPanel == dockPanel)
                    {
                        return(floatWindow);
                    }
                }
            }

            return(null);
        }
Exemple #3
0
 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);
 }
Exemple #4
0
        public static DockPane PaneAtPoint(Point pt, DockPanel dockPanel)
        {
            if (!Win32Helper.IsRunningOnMono)
            {
                for (Control control = Win32Helper.ControlAtPoint(pt); control != null; control = control.Parent)
                {
                    if (control is IDockContent content && content.DockHandler.DockPanel == dockPanel)
                    {
                        return(content.DockHandler.Pane);
                    }

                    if (control is DockPane pane && pane.DockPanel == dockPanel)
                    {
                        return(pane);
                    }
                }
            }

            return(null);
        }