コード例 #1
0
        private static bool NodeInBadPosition(Control node, Rect elementBounds)
        {
            const int rectangleCorrectionH = 3;
            const int rectangleCorrectionV = 6;

            Rect bounds = GeometryHelper.GetBasicControlBounds(node);

            bounds.X     += rectangleCorrectionV;
            bounds.Y     += rectangleCorrectionH;
            bounds.Width  = Math.Max(bounds.Width - 2 * rectangleCorrectionV, 0);
            bounds.Height = Math.Max(bounds.Height - 2 * rectangleCorrectionH, 0);
            if (bounds.IntersectsWith(elementBounds))
            {
                return(true);
            }
            return(false);
        }
コード例 #2
0
 public Rect GetBounds()
 {
     return(GeometryHelper.GetBasicControlBounds(this));
 }