共用方式為


Settings.EnableGPUAcceleration Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets a value that indicates whether to use graphics processor unit (GPU) hardware acceleration for cached compositions, which potentially results in graphics optimization.

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

Syntax

'Declaration
Public ReadOnly Property EnableGPUAcceleration As Boolean
public bool EnableGPUAcceleration { get; }

Property Value

Type: System.Boolean
true if hardware acceleration is enabled; otherwise, false.

Remarks

At the object level, you set cached composition information for graphics with the UIElement.CacheMode property and System.Windows.Media.BitmapCache values. However, the GPU acceleration feature must be enabled at the Silverlight plug-in level, and by default the feature is disabled. Set EnableGPUAcceleration to true in the host HTML to enable GPU acceleration. For more information, see EnableGPUAcceleration (Silverlight Plug-in Object). You can also set the OutOfBrowserSettings.EnableGPUAcceleration property for out-of-browser applications. For more information, see How to: Configure an Application for Out-of-Browser Support.

During profiling and performance tuning phases of application development, you can set EnableCacheVisualization to true to produce an overlay visualization of the areas in your UI that are being hardware accelerated. You can also set this property in the host HTML on the plug-in level. For more information, see EnableCacheVisualization (Silverlight Plug-in Object).

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.