c# - Frames per second using WPF's DrawingContext class -


I have an example app that rectangle using a control class override the dracuttext instances of the control class. This control calculates frames per second (FPS) by measuring the time between the average points (I denote the time between each and every caller of the dealer).

However, this figure is incorrect for FPS By looking at just the app, I can see that the figure given for FPS is more than the number of seconds that the app prepares for itself. The reason is that when you use the object's draw command , You are actually accumulating a collection of rendering instructions (although the exact storage system depends on the type of shape that provides drawing contex) which will be used later by the graphics system; Not drawing. "

So what would I want to know if there are any events that I can subscribe to, or find out in some other way How many times my WPF app / control per second is generating a new bitmap and dragging it on the screen? Can any bitmap buffer held by "Graphics System" be used?

< P> Many thanks!

What you need to use is the event that is called every frame.


Comments