TargetApplicationChosenEventArgs 类

定义

包含有关用户选择与其共享内容的目标应用的信息。 若要获取此对象,必须处理 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
继承
Object Platform::Object IInspectable TargetApplicationChosenEventArgs
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

示例

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");
}

属性

ApplicationName

包含用户选择与其共享内容的应用的名称。

适用于