views:

99

answers:

0

Yesterday, I asked a question about how to dynamically render something in .NET: specifically, I asked about how to create a white "canvas" for "drawing"/rendering upon, what framework to use, etc. However, many of the answers suggested for me to ask a more specific answer, so right now, I have come up with a completely hypothetical (and random) example of what I want to accomplish.

The example is as follows: let's assume that I'm trying to create an app where the user can first draw some rectangles (by clicking or entering dimensions) to create the outlines of their house. Next, they would be able to draw small rectangles inside to signify objects inside the house. Also, they would be able to pan or zoom. (Don't forget, this is a completely random example.)

So, if I were to try to do this, I guess I have the following questions:

  1. How do I create the white "canvas" for drawing everything upon? Some answers to my first question suggested using WPF, and I want to try that. Is there a specific control I need to add to the XAML to allow me to render such dynamic stuff on top of it?

  2. How can I draw/paint figures like these onto the canvas, and how can I change this during runtime (panning/zoom)?

  3. Do I need to create a simple coordinate plane for referencing and storing all the objects and their locations inside the "house"? If so, how?

I hope this isn't too general still, as I think that using such an example would allow people to effectively answer this question. Thanks!