DataPackageView.GetUriAsync DataPackageView.GetUriAsync DataPackageView.GetUriAsync DataPackageView.GetUriAsync DataPackageView.GetUriAsync Method

Definition

Note

GetUriAsync may be altered or unavailable for releases after Windows 8.1. Instead, use GetApplicationLink or GetWebLink.

Gets the URI contained in the DataPackageView.

public : IAsyncOperation<Uri> GetUriAsync()
IAsyncOperation<Uri> GetUriAsync() const;
public IAsyncOperation<Uri> GetUriAsync()
Public Function GetUriAsync() As IAsyncOperation<Uri>(Of Uri)
Windows.ApplicationModel.DataTransfer.DataPackageView.getUriAsync().done( /* Your success and error handlers */ );

Returns

IAsyncOperation<Uri> IAsyncOperation<Uri> IAsyncOperation<Uri>

The Uri.

Examples

if (shareOperation.data.contains(Windows.ApplicationModel.DataTransfer.StandardDataFormats.uri)) {
    shareOperation.data.getUriAsync().then(function (uri) {
        if (uri !== null) {
            // To output the link using this example, 
            // you need a div tag with an id of "output" in your HTML file.
            document.getElementById("output").innerText = uri.absoluteUri;
        }
    });
}
shareOperation.reportCompleted();