StandardDataFormats.Uri | uri property

Applies to Windows and Windows Phone

[Uri may be altered or unavailable for releases after Windows 8.1. Instead, use ApplicationLink or WebLink.]

A read-only property that returns the format ID string value corresponding to the Uniform Resource Identifier (URI) format.

Syntax

Public Shared ReadOnly Property Uri As String

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The format ID string value corresponding to the URI format.

Examples

This example demonstrates the use of the Uri 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.


function registerForShare() {
    var dataTransferManager = Windows.ApplicationModel.DataTransfer.DataTransferManager.getForCurrentView();
    dataTransferManager.addEventListener("datarequested", shareLinkHandler);
}

function shareLinkHandler(e) {
        var request = e.request;
        request.data.properties.title = "Share Link Example";
        request.data.properties.description = "A demonstration that shows how to add a link (URI) to share.";
        request.data.setUri(new Windows.Foundation.Uri("http://www.fabrikam.com"));
}


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

End of client support

Windows 8.1

End of server support

Windows Server 2012 R2

Namespace

Windows.ApplicationModel.DataTransfer
Windows::ApplicationModel::DataTransfer [C++]

Metadata

Windows.winmd

See also

StandardDataFormats

 

 

Show:
© 2014 Microsoft