WPF and creating a "endless" canvas
I am trying to make a small drawing program for small children. I am thinking on making a canvas
, and allowing them to draw on it. But I do not want to specify a size, I want to zoom out and thus allow a "endless" piece of paper (using pan + zoom to navigate). but how do I do this, the canvas
seems to have only a fixed size, and resizing it doesn't seem to work, How about the zoom, my drawings doesn't seem to be vector based, they 开发者_开发知识库are very "jagged" when zooming close.
Any other control that would be better?
Have a look at InkCanvas control, it gives you an area like a board where you may draw or handwrite; apart from this it provides various other features out of the box. You can easily find a sample for implementing zooming in InkCanvas. Some helpful links -
Draw using the InkCanvas: http://www.kirupa.com/blend_wpf/inkcanvas_pg1.htm
Seres of articles on using InkCanvas- http://blogs.msdn.com/b/swick/archive/tags/fun+with+ink+_2600_amp_3b00_+xaml/
精彩评论