コード例 #1
0
        private void RectangleCanvasMouseMove(object sender, MyArguments e)
        {
            Models.Selection arg  = sender as Models.Selection;
            Rectangle        rect = arg.Rect;

            Canvas.SetLeft(rect, e.RectangleX);
            Canvas.SetTop(rect, e.RectangleY);
        }
コード例 #2
0
        private void RectangleCanvasSetStartPoint(object sender, MyArguments e)
        {
            Models.Selection arg  = sender as Models.Selection;
            Rectangle        rect = arg.Rect;

            Canvas.SetLeft(rect, e.StartPoint.X);
            Canvas.SetTop(rect, e.StartPoint.Y);
            if (RectangleCanvas.Children.Count > 1)
            {
                RectangleCanvas.Children.RemoveAt(1);
            }
            RectangleCanvas.Children.Add(rect);
        }