In my WPF application I have some drawing functionality. I have solved this using a Canvas and handling mouse gestures manually, and I also add the drawn Strokes (wrapped in InkPresenter) to this Canvas.
Using Blend I suddenly discover that there is something called InkCanvas. According to Blend this is a control that “Defines an area that receives and displays ink strokes.”, so it sounds relevant to what I do. But everything seems to work fine using a plain Canvas..
So; how does the InkCanvas differ from the plain Canvas, and why should I choose to use this instead?
They really are meant to serve two different purposes.
Canvasis for layout. Specifically for more exact control over layout using absolute positioning.InkCanvasis, as you know, for capturing and displaying strokes.What you are doing is just fine, but
InkCanvashas some nice additional features likeEditModeamong others. It is meant to save you from writing a lot of the stuff you would have to do by hand usingCanvas. UsingCanvasis a roll your own kind of approach whereInkCanvasis a use a pre-built in kind of approach.