How do you determine if WPF is using Hardware or Software Rendering?

前端 未结 7 1174
借酒劲吻你
借酒劲吻你 2020-11-27 16:06

I\'m benchmarking a WPF application on various platforms and I need an easy way to determine if WPF is using hardware or software rendering.

I seem to recall a cal

7条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 16:12

    To answer the second half of your question, there is no way I believe really to force one way over the other. Hardware rendering is automatically used if available, otherwise, software is.

    If you need to test it in Software mode, you'll need to use a low spec machine or use Remote Desktop to view the application running on another computer. Apart from reduced performance/framerate however, there shouldn't be any visible differences in appearance between the two. Use the RenderCapability class to know if you should disable things such as animation or effects in favour of performance.

提交回复
热议问题