If I have a DrawingVisual in WPF with Opacity=0, is that enough for it not to be drawn? We have hundreds of DrawingVisuals on a Canvas, and are currently setting Opacity=0 o
The most efficient seems to be setting the opacity in my tests. Another simple approach is to redraw the visuals that are affected.
using (DrawingContext dc = RenderOpen()) {} //Hide this visual
And then redraw when they become visible again.
Rendering a blank drawingcontext seems to be very quick. But if you have complicated visuals it could take time to rerender them when they become visible.