共用方式為


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

包含使用者選擇共用內容的應用程式名稱。

適用於