tags:

views:

99

answers:

1

I have a Silverlight (v3) application that users can drag controls (e.g. Shapes, Images) onto, change the fill colour, drag around etc

I am looking for the best method to allow the user to click on a control, give a visible indication that the control can be reiszed (e.g. display resize handles) and then handle the resizing.

I have played with a few ways of doing this but I am not sure of the best way to make this as clean/generic as possible - ideally I would like to mark a control as resizable and then have common code implement this. I have tried 1) adding a ControlTemplate to a control and 2) handling the MouseLeftButtonDown event and adding a new rectangle which surrounds the object and then resizing the original control as this rectangle is resized.

Does anyone have experience of implementing this, some good code resources?

+1  A: 

Have a look at this Resize Behavior

Samuel Jack