How to draw on a Window in WPF (best practice)?

前端 未结 5 471
无人及你
无人及你 2021-02-01 04:01

I am trying to write a small interactive game-like application, where I need to have a Draw method that\'s gonna draw on screen, but can\'t figure out how to struct

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-01 04:31

    When there are just too many objects to be drawn very quickly (huge Visual Tree) another option would be to use a WriteableBitmap. Just use the Pixels property to set the pixels and/or use the Render method to draw UIElements.

提交回复
热议问题