locked
Selecting Shapes in Canvas for Windows Store App RRS feed

  • Question

  • Hi All

    I am drawing shapes on canvas element. I want to select drawn shapes by clicking on it and want to add delete and re-size functions to it. How can i achieve that give me some tips, an example would be better if available.

    Thank you 

    Friday, October 18, 2013 12:28 PM

Answers

  • Since shapes on a canvas are UIElements you can listen and respond to Pointer events. When the clicks the item you can flag it as selected, and when they click elsewhere you can unflag it.

    See Quickstart: Pointers for an intro to pointer events and Quickstart: Touch input for an intro to touch and manipulation events, including code snippets for dragging a rectangle around the screen.

    --Rob

    Friday, October 18, 2013 7:38 PM
    Moderator