Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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)

public double RenderAtScale { get; set; }

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
Available since 4.0
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2016 Microsoft