Settings.EnableFrameRateCounter Property

May 11, 2014

Gets or sets a value that indicates whether to display the current frame rate.

Namespace:  System.Windows.Interop
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Public Property EnableFrameRateCounter As Boolean

Property Value

Type: System.Boolean
true if the frames-per-second (fps) of the current application will be displayed; otherwise, false. The default is false.

The EnableFrameRateCounter property is useful as a diagnostic while you are optimizing your application code by showing the frames-per-second (fps) of the current UI. You can use the frame rate information to identify performance bottlenecks in your application.

You can set this property only at run time. Only set the property while debugging, and remove it from production code.

The format of the frame rate counter is as follows:

fps:currentFramerate/maxFramerate

currentFramerate is the optimal frame rate that would apply in absence of an upper frame rate limit, based on conditions of device. You can specify the maxFramerate value by setting the MaxFrameRate property. The default value is 60.

The currentFramerate and maxFramerate values are interpreted to mean that whichever number is lower is the actual displayed frame rate. You can illustrate this relationship between currentFramerate and maxFramerate by setting a deliberately low frame rate, such as 2 per second, and observing the results.

If EnableGPUAcceleration is true AND EnableFrameRateCounter is true, an additional frame counter displays in the upper-left corner as an overlay within UI. The format of this frame rate counter is as follows:

frameRate videoMemoryUsed GPUEnabledSurfaces intermediateSurfaces

videoMemoryUsed is in KB. intermediateSurfaces refers to surfaces implicitly created to represent the software-rendered parts of the application on the GPU.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft