StandardDataFormats.Bitmap StandardDataFormats.Bitmap StandardDataFormats.Bitmap StandardDataFormats.Bitmap StandardDataFormats.Bitmap Property


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

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

Property Value

string string string

The format ID string value corresponding to the Bitmap format.


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;
function registerForShare() {
    var dataTransferManager = Windows.ApplicationModel.DataTransfer.DataTransferManager.getForCurrentView();
    dataTransferManager.addEventListener("datarequested", shareImageHandler);

function shareImageHandler(e) {
    var request = e.request; = "Share Image Example"; = "A demonstration that shows how to share an image.";
    var deferral = request.getDeferral();
    Windows.ApplicationModel.Package.current.installedLocation.getFileAsync("images\\smalllogo.png").then(function (thumbnailFile) { = Windows.Storage.Streams.RandomAccessStreamReference.createFromFile(thumbnailFile);
        return Windows.ApplicationModel.Package.current.installedLocation.getFileAsync("images\\logo.png");
    }).done(function (imageFile) {;
    }, function (err) {