The aim of this project is to create a Silveright/WPF application to draw rectangles interactively with the mouse using Reactive Extensions and .NET 4.0
This is meant to be a very simple application .One button and a canvas (That is it.) Clicking on the button will simply reset the canvas to a blank screen.
- Left clicking on the canvas and dragging the mouse whilst keeping the left button down will show the outline of a rectangle. When the left button is released it will draw a rectangle. (The first corner will be at the location the mouse down event was raised, and the diagonally opposite corner will be at the location the mouse up even was raised)
- For every second the left click button is held down, the thickness of the border of the rectangle currently being drawn will increase from 1 to 5 and loop this way every second until the left mouse up event is raised.
- If the "ESC" button is pressed while drawing a rectangle, it will cancel the current rectangle being drawn.
- If the "CTL" button is pressed while drawing a rectangle the color of the border will be changed randomly, so that no two rectangles on the canvas have the same border color.
- If the mouse down event is raised in the canvas but the mouse up event is raised outside the canvas, no rectangle will be drawn.
That is it! this is meant to be a very simple application that can run in the browser or as a WPF desktop application. (Just to be clear, I don't need to save anything, I don't need to print anything, I don't need to draw anything else, I don't need it to make me coffee :-) OK I think you get the idea now...)
Deliverables will be a C# Visual Studio solution.
Thanks!