Exemplo n.º 1
0
        public override void OnMouseMove(DrawingCanvas drawingCanvas, Point position, MouseButtonState leftButton, MouseButtonState rightButton)
        {
            drawingCanvas.Cursor = ToolCursor;

            if (leftButton == MouseButtonState.Pressed)
            {
                if (drawingCanvas.IsMouseCaptured)
                {
                    if (drawingCanvas.Count > 0)
                    {
                        GraphicsRectangle grect = drawingCanvas[drawingCanvas.Count - 1] as GraphicsRectangle;
                        grect.MoveMouse(position);
                    }
                }
            }
        }
Exemplo n.º 2
0
 public VisualRectangle(GraphicsBase graphics) :
     base(graphics)
 {
     this.graphicsRect = graphics as GraphicsRectangle;
 }