Create a shape, drag and drop it, then adjust it?

Unanswered Create a shape, drag and drop it, then adjust it?

  • Saturday, December 22, 2012 9:05 AM
     
     
    I am trying to figure out how to drag shapes onto a canvas where I can select them and adjust them as needed. I need to be able to create the shapes by clicking on one or something, then I need to be able to adjust the shapes or move them around on a canvas

All Replies

  • Monday, December 24, 2012 3:53 AM
    Moderator
     
     
    Are you talking about in Blend while designing your application, or at runtime, as in you are trying to build a tool like Blend?
  • Friday, December 28, 2012 5:18 AM
     
     

    I am talking about at run time. I am trying to make an app that allows me to layout a room with circular tables and square tables and perhaps some images. I need to be able to select from an object and move it on to the floor. What would be ideal, is to be able to have those squares and circles and other objects some how connect to a data source.

    So, yeah, basically it would be at run time and the objects would be on a canvas type layout so I can move them and reshape them.


  • Friday, December 28, 2012 3:10 PM
    Moderator
     
     

    That will definitely require some coding, although there are probably some pre-existing behaviors that can help.

    For the movement, MouseDragElementBehavior can probably help. You could look at how that is implemented with ilspy and do some similar things for your create code as well, or just have a + button that adds a new one to the scene, and use the MouseDragElementBehavior for movement.