I have a usercontrol consisting of a label and a text field. This is inside the scrollviewer.
I draw an adorner above it, and I need to adjust the adorner size to the visible size of the control.
How to get the visible size of the control?
In the image below the green rectangle is adorner. As you can see, it is drawn on the scroll bar on the right side.
Can I get the size of the processed part or do I have to manually go through the visual tree and calculate it?
edit: more background information
I create a very limited form constructor. Everything happens in code. Adorner is used to display the currently selected control.

source
share