How to draw graphics as efficiently as possible in WPF

后端 未结 3 786
情歌与酒
情歌与酒 2021-01-31 05:05

I am creating a tool which relies heavily on graph-node trees. The current implementation is done in Java and I\'m porting it to a generic code-base on C#, so it can be used by

3条回答
  •  我在风中等你
    2021-01-31 05:39

    the DrawingVisual seems to be a valid choice:

    The DrawingVisual is a lightweight drawing class that is used to render shapes, images, or text. This class is considered lightweight because it does not provide layout or event handling, which improves its performance. For this reason, drawings are ideal for backgrounds and clip art.

    source: Using DrawingVisual Objects

    so this seems to be absolutely what you ask, a Canvas SUPER lightweight.

提交回复
热议问题