How to calculate the total rendering time of a wpf control?

 ̄綄美尐妖づ 提交于 2019-12-12 07:22:39

问题


Is there any profiler or tools available to calculate the "Rendering Time" of a particular control.

Rendering Time - Time taken by the control to completely render visually on to the screen.


回答1:


I don't know of any tools, but if its just a single control you could create a sub class, override the Render methods and use a StopWatch to find some timings...




回答2:


Here is a nice tip on the same subject too to make the measurment from the ViewModel(using the Dispatcher):

http://www.japf.fr/2009/10/measure-rendering-time-in-a-wpf-application/comment-page-1/#comment-2892



来源:https://stackoverflow.com/questions/4255664/how-to-calculate-the-total-rendering-time-of-a-wpf-control

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!