QuickLink Class

Rappresenta i collegamenti che consentono agli utenti di condividere il contenuto con le applicazioni utilizzate più di frequente.

Sintassi

var quickLink = new Windows.ApplicationModel.DataTransfer.ShareTarget.QuickLink();
public sealed class QuickLink
Public NotInheritable Class QuickLink
public ref class QuickLink sealed 

Attributi

[MarshalingBehavior(Standard)]

[Version(0x06020000)]

Membri

QuickLinkClasse include questi tipi di membri:

  • Costruttori
  • Metodi
  • Proprietà

Costruttori

QuickLinkClasse include questi costruttori.

Costruttore Descrizione
QuickLink Creates a new instance of a QuickLink object.

 

Metodi

The QuickLink Classe eredita i metodi da Object Classe (C#/VB/C++).

Proprietà

Classe dispone di tali proprietà. di QuickLink

Proprietà Tipo di accesso Descrizione

Id

Lettura/scrittura 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.

SupportedDataFormats

Sola lettura 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.

SupportedFileTypes

Sola lettura 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.

Thumbnail

Lettura/scrittura 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.

Title

Lettura/scrittura 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.

 

Note

Nota  : Questa classe non è Agile, cioè è necessario considerare il relativo modello di threading e il relativo comportamento di marshalling. Per ulteriori informazioni, vedere la sezione Threading e marshaling (C++/CX) e Utilizzo di oggetti Windows Runtime in un ambiente con multithreading (.NET).

Esempi

La funzione seguente crea e restituisce un 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);
}

Requisiti

Client supportato minimo

Windows 8 [Solo applicazioni Windows Store]

Server supportato minimo

Windows Server 2012 [Solo applicazioni Windows Store]

Spazio dei nomi

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

Metadati

Windows.winmd