BitmapCache.RenderAtScale Property

Gets or sets a value that indicates the scale that is applied to the bitmap.

Namespace:  System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public double RenderAtScale { get; set; }
<object RenderAtScale="double" .../>

Property Value

Type: System.Double
The scale that is applied to the bitmap. The default is 1.

Use the RenderAtScale property to render the BitmapCache at a multiple of the normal bitmap size. The normal size is determined by the local size of the element.

Values greater than 1 increase the resolution of the bitmap relative to the native resolution of the element, and values less than 1 decrease the resolution. For example, if the RenderAtScale property is set to 2.0, and you apply a scale transform that enlarges the content by a factor of 2, the content will have the same visual quality as the same content with RenderAtScale set to 1.0 and a transform scale of 1.

When RenderAtScale is set to 0, no bitmap is rendered. Negative values are clamped to 0.

If you change this value, the cache is regenerated at the appropriate new resolution.

The following images show how the same content appears for different values of the RenderAtScale property.

RenderAtScale = 1

RenderAtScale = 1

RenderAtScale = 0.5

RenderAtScale = 0.5

RenderAtScale = 0.2

RenderAtScale = 0.2

The following image shows a zoom transform that is applied to an ancestor of the cached element. When the zoom is set to 1 and RenderAtScale is set to 1, the image quality is almost the same as when RenderAtScale is set to 2. But when zoom is greater than 1, setting RenderAtScale to 2 will have better image quality.

RenderAtScale = 1.0

RenderAtScale = 1.0

RenderAtScale = 2.0

RenderAtScale = 2.0

.NET Framework

Supported in: 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft