Partilhar via


BitmapCache.RenderAtScale Property

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

Gets or sets the scale at which the object is rendered on the cached bitmap surface. Use this property for cached objects that are scaled to improve performance.

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

Syntax

'Declaration
Public Property RenderAtScale As Double
public double RenderAtScale { get; set; }
<BitmapCache RenderAtScale="double" .../>

Property Value

Type: System.Double
The scale at which the object is rendered as a cached bitmap. If you specify a negative number, an error will be thrown. The default is 1.

Remarks

Dependency property identifier field: RenderAtScaleProperty

By default, when you set the CacheMode of a UIElement to a BitmapCache, the object is cached as a bitmap with a scale of 1 (its natural size). However, if you scale the cached UIElement, for example by using a ScaleTransform, set the RenderAtScale property to the same scale.

You can query for the current state of the hardware using EnableGPUAcceleration; see Silverlight Hardware Acceleration for more information.

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.