views:

413

answers:

1

Hi,

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

+1  A: 

Hi Andrej,

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

Anvaka
Thanks, that pretty much it. Although a co-worker says, that there has to be another way and that he saw elements inside an Adorner beeing not affected by Transforms "automatically". Is it possible that there is another solution, which does not re-transform the Adorner Elements?
Andrej