DataPackage.SetBitmap(RandomAccessStreamReference) Method
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.
Sets the bitmap image contained in the DataPackage.
public:
virtual void SetBitmap(RandomAccessStreamReference ^ value) = SetBitmap;
void SetBitmap(RandomAccessStreamReference const& value);
public void SetBitmap(RandomAccessStreamReference value);
function setBitmap(value)
Public Sub SetBitmap (value As RandomAccessStreamReference)
Parameters
A stream that contains the bitmap image.
Examples
The following example uses the setBitmap method to share an image with a target app.
void DataRequested(DataTransferManager sender, DataRequestedEventArgs e)
{
DataRequestDeferral deferral = e.Request.GetDeferral();
e.Request.Data.Properties.Title = "Hello World!";
e.Request.Data.Properties.Description = "This example shows how to share files and images.";
if (this.dataPackageThumbnail != null)
{
e.Request.Data.Properties.Thumbnail = this.dataPackageThumbnail;
}
e.Request.Data.SetBitmap(imageStreamRef);
deferral.Complete();
}
Remarks
This method sets the value for StandardFormats.Bitmap.
Bitmap is one of the data types that the DataPackage object supports directly. See the StandardDataFormats class for information on other supported data types.