none
InkCanvas own copy/paste routine. RRS feed

  • Question

  • Hi!

    I've run in to problems with InkCanvas, everytime I try to copy any of my children I get some Xaml parsing errors or such. I have implemented ICloneable for my children, since they are also saved to file using my own XML writing/reading. I'd rather just use my own Clone method for the Copy & Pasting of these children.

    Anyone managed to override the copy & paste of children in InkCanvas, any neat way?

    I'm willing to go through ____ to do this, and suspect I have to use Reflection again, because of lacks of InkCanvas. I've already managed to fool the InkCanvas to Select using right mouse button, and erase using middle mouse button...

    (In same spirit I've started to also implement own InkCanvas, never ending project, which already demonstrates the possibility of multiple people drawing to same InkPresenter at the same time. Though the lacks of InkPresenter also turns me off, it doesn't allow for one to create natural z-order for strokes *and* children, like any usable drawing program. Sorry about the rant :) )

    Thanks.
    Monday, December 7, 2009 12:14 PM

Answers

  • I found a way, overriding the CommandBindings of InkCanvas of commands ApplicationCommands.Copy, ApplicationCommands.Paste and ApplicationCommands.Cut.
    • Marked as answer by Ciantic Wednesday, December 9, 2009 3:23 PM
    Wednesday, December 9, 2009 3:23 PM