QuickLink QuickLink QuickLink QuickLink Class

Definition

Represents shortcuts that help users share content with the apps they use most.

public : sealed class QuickLink : IQuickLinkpublic sealed class QuickLink : IQuickLinkPublic NotInheritable Class QuickLink Implements IQuickLink// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Examples

The following function creates and returns a QuickLink.

function reportCompleted() {
    var quickLink = new Windows.ApplicationModel.DataTransfer.ShareTarget.QuickLink();
    quickLink.id = "123456789";
    quickLink.title = id("quickLinkTitle").value;
    
    // For quicklinks, the supported FileTypes and DataFormats are set 
    // independently from the manifest.
    var dataFormats = Windows.ApplicationModel.DataTransfer.StandardDataFormats;
    quickLink.supportedFileTypes.replaceAll(["*"]);
    quickLink.supportedDataFormats.replaceAll([dataFormats.text, dataFormats.uri, 
        dataFormats.bitmap, dataFormats.storageItems, dataFormats.html, customFormatName]);

    Windows.ApplicationModel.Package.current.installedLocation.getFileAsync("images\\user.png").then(function (iconFile) {
        quickLink.thumbnail = Windows.Storage.Streams.RandomAccessStreamReference.createFromFile(iconFile);
        shareOperation.reportCompleted(quickLink);
    });
    shareOperation.reportCompleted(quickLink);
}

Remarks

Quicklinks are not supported on Windows Phone 8.1. Apps running on Windows Phone 8.1 can still receive Quicklinks as part of a share operation, but they will be automatically ignored.

Note

: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).

Constructors

QuickLink() QuickLink() QuickLink() QuickLink()

Creates a new instance of a QuickLink object.

public : QuickLink()public QuickLink()Public Sub New()// You can use this method in JavaScript.

Properties

Id Id Id Id

Specifies an ID for the QuickLink. Your app receives this ID when the user selects its QuickLink. You can use this ID to further customize the sharing process for the user.

public : PlatForm::String Id { get; set; }public string Id { get; set; }Public ReadWrite Property Id As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

Specifies the ID for the QuickLink.

SupportedDataFormats SupportedDataFormats SupportedDataFormats SupportedDataFormats

An array of strings that specify the data formats supported by the QuickLink app. The system shows the QuickLink only when the data that a user wants to share matches a format in this array.

public : IVector<string> SupportedDataFormats { get; }public IList<string> SupportedDataFormats { get; }Public ReadOnly Property SupportedDataFormats As IList<string>// You can use this property in JavaScript.
Value
IVector<PlatForm::String> IList<string> IList<string> IList<string>

An array of format ids that specify the data formats supported by the QuickLink app.

SupportedFileTypes SupportedFileTypes SupportedFileTypes SupportedFileTypes

An array of strings that specify the file types supported by a QuickLink app. The system shows the QuickLink only when the data that a user wants to share contains file items, and the file extensions for those file items match a file type in this array.

public : IVector<string> SupportedFileTypes { get; }public IList<string> SupportedFileTypes { get; }Public ReadOnly Property SupportedFileTypes As IList<string>// You can use this property in JavaScript.
Value
IVector<PlatForm::String> IList<string> IList<string> IList<string>

An array of file extensions that specify the file types supported by the QuickLinks app.

Thumbnail Thumbnail Thumbnail Thumbnail

Specifies a thumbnail image for the QuickLink. The system displays this image when the user is presented with a list of possible apps to share content with.

public : RandomAccessStreamReference Thumbnail { get; set; }public RandomAccessStreamReference Thumbnail { get; set; }Public ReadWrite Property Thumbnail As RandomAccessStreamReference// You can use this property in JavaScript.

Title Title Title Title

Specifies the title of a QuickLink. The system displays this info when the user is presented with a list of possible apps to share content with.

public : PlatForm::String Title { get; set; }public string Title { get; set; }Public ReadWrite Property Title As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

Specifies the title of the QuickLink.