views:

150

answers:

1

Hello!

I am trying to check how fast the Frame control can display a FixedPage object when it is assigned to Frame.Content property. I plan to check the tick count before and after the assignment to the Content property.

Example:

int starttime = Environment.TickCount;
frame1.Content = fixedpage;
int endtime = Environment.TickCount;

The problem is that the assignment to the Content property might be asynchronous and returns immediately therefore i get a zero amount of time. The rendering of the FixedPage however visually has a lag time from assignment of the Content property up to the point where the FixedPage appears on screen.

The Frame.ContentChanged() event is no good either because it gets triggered even before the FixedPage appears on screen so it's not accurate.

I'm thinking of detecting the change on the window or control's display instead in order to get the time when the FixedPage is actually displayed on screen.

Is there a way to do this in WPF?

Thanks!

A: 

You could try one of the WPF Profling Tools for WPF mentioned here.

Lars Truijens