BitmapCache.RenderAtScale Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates the scale that is applied to the bitmap.
public:
property double RenderAtScale { double get(); void set(double value); };
public double RenderAtScale { get; set; }
member this.RenderAtScale : double with get, set
Public Property RenderAtScale As Double
Property Value
The scale that is applied to the bitmap. The default is 1.
Remarks
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 = 0.5
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 = 2.0