Is there a way to set visibility of DrawingVisual object other than removing it from the canvas (for invisibility) and redraw it using information stored somewhere to make it visible again?
I want to do it after DrawingContext of the DrawingVisual has been closed.
DrawingVisualdoesn’t haveVisibilityproperty, as it doesn’t derive fromFrameworkElement.So you cannot do that that easily. However, you can make it transparent, by adjusting
VisualOpacityon it. The MSDN doc says,Hope that helps.