Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF Adorner Transforms

I am building a control, where the user can "draw" resizable rectangles that are laid over the content. To resize those rectangles, I use an Adorner on top of them which contains 4 Thumbs to change the size of the rectangle.

The problem is, that this control is is "zoomable", meaning a ScaleTransform is applied to the whole control depending on a zoom factor. The Thumbs in the Adorner are affected by this ScaleTransform as well.

But I need them to keep their size, independent of the zoom factor. I tried putting the Adorners in a Layer of another non-transformed control instead of the rectangle-layer, but this didn't work. How can I achieve this?

Thanks, Andrej

like image 855
Andrej Avatar asked Sep 02 '09 15:09

Andrej


1 Answers

Have you checked this post: Transformations on AdornedElement are also applied to Adorner?! ? Does it work?

like image 53
Anvaka Avatar answered Oct 03 '22 19:10

Anvaka