Gets or sets the maximum number of frames to render per second.
Assembly: System.Windows (in System.Windows.dll)
The actual frame rate that Silverlight content renders depends on system load performance. You can specify the range using the property:
The minimum frame rate is 1.
The maximum frame rate is platform-dependent. A value of approximately 60 frames-per-second should be reliable on all platforms. The 1000 and 30000 frames-per-second range is where the maximum frame rate could differ between platforms.
Note that there is a mismatch in naming between the parameter in createObject/createObjectEx and the runtime property. The instantiation parameter is named framerate, this runtime property is named , but these are both referring to the same value.
You can display a frame rate counter for diagnostic purposes. Fore more information, see EnableFrameRateCounter.
The following code example demonstrates how to use this property.
' The Host object, which represents the host Silverlight plug-in. Dim host As System.Windows.Interop.SilverlightHost = _ Application.Current.Host ' The following code demonstrates how to use the Host object ' to access other APIs in the System.Windows.Interop namespace. ' The IsVersionSupported method. This method is useful when ' you want to implement an upgrade experience in managed code. Dim isSupported As Boolean = host.IsVersionSupported("2.0.30908.0") ' Read-only properties of the Host object. Dim pluginBackground As System.Windows.Media.Color = host.Background Dim loaded As Boolean = host.IsLoaded Dim source As Uri = host.Source ' The Settings object, which represents Web browser settings. Dim settings As System.Windows.Interop.Settings = host.Settings ' Read/write properties of the Settings object. settings.EnableFrameRateCounter = True settings.EnableRedrawRegions = True settings.MaxFrameRate = 60 ' Read-only properties of the Settings object. Dim windowless As Boolean = settings.Windowless Dim htmlAccessEnabled As Boolean = settings.EnableHTMLAccess ' The Content object, which represents the plug-in display area. Dim content As System.Windows.Interop.Content = host.Content ' The read/write IsFullScreen property of the Content object. ' See also the Content.FullScreenChanged event. Dim isFullScreen As Boolean = content.IsFullScreen ' Read-only properties of the Content object. These properties do ' not contain meaningful values until after the Content.Resized ' event occurs for the first time. Dim actualWidth As Double = content.ActualWidth Dim actualHeight As Double = content.ActualHeight