BitmapCache 构造函数

定义

初始化 BitmapCache 类的新实例。

重载

名称 说明
BitmapCache()

初始化 BitmapCache 类的新实例。

BitmapCache(Double)

使用指定的刻度初始化类的新实例 BitmapCache

BitmapCache()

初始化 BitmapCache 类的新实例。

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

适用于

BitmapCache(Double)

使用指定的刻度初始化类的新实例 BitmapCache

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

参数

renderAtScale
Double

缩放位图的双精度值。

示例

以下 XAML 演示如何创建和分配 BitmapCache 元素 Canvas 。 有关完整的代码示例,请参阅 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>

另请参阅

适用于