Selection Clipboard Operations RRS feed

  • Question

  • Hello,

    1. How does one know if there is selection (strokes or elements) without having to put it on clipboard?
    2. How does one delete selection without putting it on clipboard?
    3. If the above two require clipboard, is there a way to get a temporary clipboard so that the "main" clipboard contents are unaffected?

    Thanks in advance.

    Vinay Agarwal
    Wednesday, January 31, 2007 12:36 AM


  • Hi Vinay,

    1. Call InkCanvas.GetSelectedStrokes() or InkCanvas.GetSelectedElements() to find out which (if any) strokes and elements are selected.

    2. There are three ways to delete the selection without putting it on the clipboard:

      a. Call InkCanvas.Strokes.Remove(InkCanvas.GetSelectedStrokes)

      b. Send the ApplicationCommands.Delete command

      c. Press the Del key

    3. You don't need to use the clipboard for this


    Thanks, Stefan Wick

    Wednesday, January 31, 2007 5:43 AM