Beispiel #1
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                foreach (Rect rect in rects.Reverse())
                {
                    if (rect.HitTest(e.Location))
                    {
                        draggedRect        = rect;
                        startMouseLocation = e.Location;
                        return;
                    }
                }


                draggedRect = null;
            }
        }