DrawingVisual performance with Opacity=0

前端 未结 4 1696
刺人心
刺人心 2021-01-13 19:54

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

4条回答
  •  暖寄归人
    2021-01-13 20:48

    Why not simply remove the visual from the visual children list? When it needs to be visible you add it back.

提交回复
热议问题