Dela via


StandardDataFormats.Uri Property

Definition

Note

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.

public:
 static property Platform::String ^ Uri { Platform::String ^ get(); };
/// [get: Windows.Foundation.Metadata.Deprecated("Uri may be altered or unavailable for releases after Windows Phone 'OSVersion' (TBD). Instead, use WebLink or ApplicationLink.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
static winrt::hstring Uri();
/// [get: Windows.Foundation.Metadata.Deprecated("Uri may be altered or unavailable for releases after Windows Phone 'OSVersion' (TBD). Instead, use WebLink or ApplicationLink.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
static winrt::hstring Uri();
public static string Uri { [Windows.Foundation.Metadata.Deprecated("Uri may be altered or unavailable for releases after Windows Phone 'OSVersion' (TBD). Instead, use WebLink or ApplicationLink.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))] get; }
public static string Uri { [Windows.Foundation.Metadata.Deprecated("Uri may be altered or unavailable for releases after Windows Phone 'OSVersion' (TBD). Instead, use WebLink or ApplicationLink.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")] get; }
var string = StandardDataFormats.uri;
Public Shared ReadOnly Property Uri As String

Property Value

String

Platform::String

winrt::hstring

The format ID string value corresponding to the Uniform Resource Identifier (URI) format.

Attributes

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.

public void ShareSourceLoad()
{
    DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();
    dataTransferManager.DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(this.DataRequested);
}

void DataRequested(DataTransferManager sender, DataRequestedEventArgs e)
{
    DataRequest request = e.Request;
    request.Data.Properties.Title = "Share Link Example";
    request.Data.Properties.Description = "An example of how to share a link.";
    var link = new Uri("http://www.fabrikam.com");
    request.Data.SetUri(link);
}

Applies to