How to calculate the total rendering time of a wpf

2019-02-15 17:14发布

问题:

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