Editar

Partilhar via


BitmapCache Constructors

Definition

Initializes a new instance of the BitmapCache class.

Overloads

BitmapCache()

Initializes a new instance of the BitmapCache class.

BitmapCache(Double)

Initializes a new instance of the BitmapCache class with the specified scale.

BitmapCache()

Initializes a new instance of the BitmapCache class.

public:
 BitmapCache();
public BitmapCache ();
Public Sub New ()

Applies to

BitmapCache(Double)

Initializes a new instance of the BitmapCache class with the specified scale.

public:
 BitmapCache(double renderAtScale);
public BitmapCache (double renderAtScale);
new System.Windows.Media.BitmapCache : double -> System.Windows.Media.BitmapCache
Public Sub New (renderAtScale As Double)

Parameters

renderAtScale
Double

A double that scales the bitmap.

Examples

The following XAML shows how to create and assign a BitmapCache to a Canvas element. For the complete code example, see How to: Improve Rendering Performance by Caching an Element.

<!-- //////////////////////////////////////////////////////////////// -->
<!-- // The following XAML creates a BitmapCache with default      // -->
<!-- // properties and assigns it as the CacheMode for the canvas. // -->
<!-- //////////////////////////////////////////////////////////////// -->
<Canvas.CacheMode>
    <BitmapCache EnableClearType="False" 
                 RenderAtScale="1" 
                 SnapsToDevicePixels="False"  />
</Canvas.CacheMode>

See also

Applies to