Compartilhar via


TargetApplicationChosenEventArgs Classe

Definição

Contém informações sobre o aplicativo de destino com o qual o usuário escolheu compartilhar conteúdo. Para obter esse objeto, você deve manipular o evento TargetApplicationChosen .

public ref class TargetApplicationChosenEventArgs sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class TargetApplicationChosenEventArgs final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class TargetApplicationChosenEventArgs
Public NotInheritable Class TargetApplicationChosenEventArgs
Herança
Object Platform::Object IInspectable TargetApplicationChosenEventArgs
Atributos

Requisitos do Windows

Família de dispositivos
Windows 10 (introduzida na 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduzida na v1.0)

Exemplos

var dataTransferManager = Windows.ApplicationModel.DataTransfer.getForCurrentView();
dataTransferManager.addEventListener("targetapplicationchosen", onTargetApplicationChosen);

function onTargetApplicationChosen(targetApplicationChosentEvent) {
    var appChosenDiv = document.createElement("div");
    appChosenDiv.innerText = targetApplicationChosenEvent.applicationName;
    document.body.appendChild("appChosenDiv");
}

Propriedades

ApplicationName

Contém o nome do aplicativo com o qual o usuário escolheu compartilhar conteúdo.

Aplica-se a