I have successfully rendered my scene (simple geometric shapes) using a VisualCollection of DrawingVisuals, and I can successfully hit test them to see when the user clicks on one. I now need to show that element as selected.
sample code I found online changes the opacity of a drawingvisual from 1.0 to 0.4 when clicked, but this is not the effect I want to use - I would rather draw a thicker yellow outline around it, but it seems like I would have to recreate the VisualCollection from scratch (or add and remove the selected item) to change the border pen.
Is there a more accepted way? Adorners, maybe? Or maybe not using DrawingVisuals and using OnRender instead, and then re-rendering after an object is selected? Code example would be great.
thx.