Sanjeet Kumar
Sanjeet Kumar

Reputation:

Resizing a control in WPF

I have a set of user controls in my wpf form and want to give ability to user to resize them. Whenever a user clicks on a control total 8 boundary rectangles should appear and then by dragging any of them, the user must be able to resize the control. Please help me on this.

Upvotes: 4

Views: 18656

Answers (2)

rr789
rr789

Reputation: 660

I made a library that applies resize grips to any control.

enter image description here

Homepage has a quick gif video showing it in-action.

Very simple, just call one line of code.

//Set max resize to 200px max height, 300px max width.
new CResizeAdorner(button1, 200, 300); 

Upvotes: 2

Simon Söderman
Simon Söderman

Reputation: 335

What you want is to build a Resize Adorner. If you google it thou shallt find! http://dvuyka.spaces.live.com/blog/cns!305B02907E9BE19A!144.entry Don´t know if that´s the best sample around, but it´s a good start anyways! /Simon

Upvotes: 2

Related Questions