Resizing a control in WPF

后端 未结 2 942
無奈伤痛
無奈伤痛 2020-12-09 00:42

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 a

相关标签:
2条回答
  • 2020-12-09 00:45

    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

    0 讨论(0)
  • 2020-12-09 00:45

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

    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); 
    
    0 讨论(0)
提交回复
热议问题