EnableFrameRateCounter Property

Gets or sets a value that determines whether to display the current framerate in the hosting browser's status bar. (Microsoft Internet Explorer only)

Scripting (Instantiation)
Not exposed by CreateObject/CreateObjectEx
Scripting (Runtime)
value = silverlightObject.settings.enableFrameRateCounter
silverlightObject.settings.enableFrameRateCounter = value

Property Value


Determines whether to show the frames-per-second (fps) of the current rendered Silverlight content in the hosting browser's status bar.

This property is read/write. The default value is false.


This property is available on the settings sub-object of a Silverlight plug-in instance.

The EnableFrameRateCounter property is useful for optimizing your application by showing the frames-per-second (fps) of the current rendered Silverlight content. You can use the framerate information to identify performance bottlenecks in your application. This property is supported only for Microsoft Internet Explorer running on Windows XP SP2 or Windows Vista

This property does not have a matching parameter on CreateObject/CreateObjectEx in Silverlight.js. You can set it at runtime, for instance in an OnLoad handler.

The following illustration shows the framerate displayed in the left side of the browser status bar. The framerate value changes in response to Silverlight rendering requests:

Current framerate displayed in the browser status bar

Current framerate displayed in the browser status bar

The format of the framerate counter is as follows:


currentFramerate is the optimal framerate that would apply in absence of an upper framerate limit, based on conditions of the plug-in's environment and reported by the plug-in. maxFramerate is configurable, via the framerate initialization parameter (see Instantiating a Silverlight Plug-in). maxFramerate defaults to 24. Each of these numbers is a value reporting frames per second (fps). These 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 and by setting a deliberately low frame rate such as 2 per second and observing the results.


The following JavaScript example shows how to retrieve the value of the EnableFrameRateCounter property:

// Retrieve a reference to the plug-in.
var plugin = sender.getHost();
// Retrieve the EnableFrameRateCounter property.
var enableFramerateCounter = plugin.settings.enableFrameRateCounter;

Applies To

Silverlight Plug-in

See Also

Silverlight Object Models and Scripting to the Silverlight Plug-in
Instantiating a Silverlight Plug-in (Using CreateSilverlight.js and Silverlight.js)