Using the DrawingContext class I’ve been able to use the DrawRectangle() method to successfully add an adorner to my adornedElement.
Is it possible to construct a stackpanel, with a textbox and image inside – and assign this as the adorner?
I’m using visual studio 2010 by the way – not microsoft expression.
Thanks a lot,
Dan
No, this is not possible out of the box as the DrawingContext is only meant to draw Visuals and no FrameworkElements.
What you can do is create your own Adorner which is able to draw FrameworkElements:
Usage:
You could also incorporate the creation of the StackPanel directly in the Adorner if you use this combination of a StackPanel multiple times. That depends on your scenario.