Hey, I have a bunch of ContentControls on a Canvas, the ContentControls each have an adorner on top of them to increase the selection area (some ContentControls may be rendered as 1-pixel lines, and so are hard to click on).
I'd like to allow the adorners to be styled by anyone from XAML, so for example when the mouse is over the adorner, it will show a blue outline.
How can I allow the adorner to pick up a ControlTemplate from my resource dictionaries?
Thanks.
An
Adornercan have any numberSystem.Windows.Media.Visual-derived element as its children. So you could create aUserControlor Custom Control and host it within theAdorner. That way styling/templating it should be the same as it is when using those controls elsewhere.