Udostępnij za pośrednictwem


StandardDataFormats.Bitmap Property

Definition

A read-only property that returns the format ID string value corresponding to the Bitmap format.

public:
 static property Platform::String ^ Bitmap { Platform::String ^ get(); };
static winrt::hstring Bitmap();
public static string Bitmap { get; }
var string = StandardDataFormats.bitmap;
Public Shared ReadOnly Property Bitmap As String

Property Value

String

Platform::String

winrt::hstring

The format ID string value corresponding to the Bitmap format.

Examples

This example demonstrates the use of the Bitmap property. To use the code in this example, add an event listener to your app to handle the activated event. Then put this code in the function that this event listener calls.

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();
}

Applies to