DataObject.SetImage(BitmapSource) 方法

定义

将数据 Bitmap 存储在此数据对象中。 图像数据指定为 BitmapSource.

public:
 void SetImage(System::Windows::Media::Imaging::BitmapSource ^ image);
public void SetImage(System.Windows.Media.Imaging.BitmapSource image);
member this.SetImage : System.Windows.Media.Imaging.BitmapSource -> unit
Public Sub SetImage (image As BitmapSource)

参数

image
BitmapSource

包含 BitmapSource 要存储在数据对象中的图像数据的对象。

例外

imagenull

注解

位图将计算机图形表示为内存中的位数组,这些位表示图像中各个像素的属性。

此方法添加启用了自动转换的数据(与调用设置为SetData(String, Object, Boolean)的调用autoConverttrue相同)。

适用于

另请参阅