Esempio n. 1
0
 protected Control GetChildAtLocation(double x, double y)
 {
     foreach (LayoutInformation layoutInformation in LayoutInformation.OrderByDescending(li => li.ZIndex))
     {
         Rectangle rectangle = layoutInformation.Rectangle;
         double    minX      = rectangle.X;
         double    minY      = rectangle.Y;
         double    maxX      = minX + rectangle.Width;
         double    maxY      = minY + rectangle.Height;
         if (x >= minX && x <= maxX && y >= minY && y <= maxY)
         {
             return(layoutInformation.Control);
         }
     }
     return(null);
 }