Gets or sets a value that indicates that rendered content should be cached when possible.
Assembly: System.Windows (in System.Windows.dll)
<uiElement> <uiElement.CacheMode> singleBitmapCache </uiElement.CacheMode> </uiElement>
Property ValueType: System.Windows.Media.CacheMode
A value that indicates that rendered content should be cached when possible. If you specify a value of CacheMode, rendering operations from RenderTransform and Opacity execute on the graphics processing unit (GPU), if available. The default is null, which does not enable a cached composition mode.
Dependency property identifier field: CacheModeProperty
In order to enable caching, you must enable composition caching at the plug-in level by setting the value of an EnableGPUAcceleration param element to true as part of the object tag that declares the Silverlight plug-in.
To use GPU hardware acceleration in Silverlight effectively, you should understand how Silverlight uses hardware acceleration and cached composition in its architecture, and which Silverlight objects and rendering scenarios can benefit under hardware acceleration. For more information, see Silverlight Hardware Acceleration.
You can profile hardware acceleration optimizations in the development phase of your application; see EnableCacheVisualization (Silverlight Plug-in Object).
The XAML usage shown is the only practical available usage in Silverlight core libraries. In theory, other CacheMode classes could be written to fill the value, but these would be custom classes. See BitmapCache for the attributes you might set on the BitmapCache object element value.
Out-of-browser applications do not have editable hosting HTML. To enable GPU acceleration for an out-of-browser application, set the attribute EnableGPUAcceleration to true on the OutOfBrowserSettings element that you declare in your Deployment XAML file.
Silverlight for Windows PhoneSilverlight for Windows Phone has a different set of operations that can use GPU acceleration; for more information, see Graphics in Silverlight for Windows Phone.
Before you can use the property, you need to enable GPU acceleration at the plug-in level (in the HTML) by setting the EnableGPUAcceleration parameter to true.
<param name="EnableGPUAcceleration" value="true" />
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.