title: How to measure screen render time in WPF
body: <p>I am attempting to measure the performance for a WPF based application. Currently we have code that times how long it takes to add the content to the WPF render tree. At this point, control is returned to our program. The problem is that there is still a lag before content is displayed on the screen by WPF. For complicated rendering trees, this can be a matter of seconds.</p>
  
  <p>Can you recommend a method to determine when WPF has completed rendering to the screen? I would like these tests to be fully automated and not rely on someone sitting around with a stopwatch.</p>
  
  <p>[update]</p>
  
  <p>Thanks for the suggestions so far.</p>
  
  <p>I have tried waiting for the Loaded and ContentRendered events, but both fire before the content makes it to the screen.</p>
  
  <p>It looks like others are having this issue. I have tried the steps suggested at
  <a href="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/693fbedb-efa6-413e-ab66-530c6961d3fb/" rel="noreferrer">http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/693fbedb-efa6-413e-ab66-530c6961d3fb/</a> but still haven't been able force my code to wait for the rendering to complete.</p>