WebUIFileActivatedEventArgs クラス

定義

ファイルに関連付けられているアプリであるため、アプリがアクティブ化されたときにデータを提供します。

public ref class WebUIFileActivatedEventArgs sealed : IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles, IActivatedEventArgsDeferral
public ref class WebUIFileActivatedEventArgs sealed : IActivatedEventArgsWithUser, IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles, IActivatedEventArgsDeferral
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
class WebUIFileActivatedEventArgs final : IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles, IActivatedEventArgsDeferral
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
class WebUIFileActivatedEventArgs final : IActivatedEventArgsWithUser, IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles, IActivatedEventArgsDeferral
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
public sealed class WebUIFileActivatedEventArgs : IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles, IActivatedEventArgsDeferral
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
public sealed class WebUIFileActivatedEventArgs : IActivatedEventArgsWithUser, IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles, IActivatedEventArgsDeferral
Public NotInheritable Class WebUIFileActivatedEventArgs
Implements IActivatedEventArgsDeferral, IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles
Public NotInheritable Class WebUIFileActivatedEventArgs
Implements IActivatedEventArgsDeferral, IActivatedEventArgsWithUser, IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles
継承
Object Platform::Object IInspectable WebUIFileActivatedEventArgs
属性
実装

Windows の要件

デバイス ファミリ
Windows 10 (10.0.10240.0 で導入)
API contract
Windows.Foundation.UniversalApiContract (v1.0 で導入)

アクティブ化されたイベント ハンドラーは、すべてのアクティブ化イベントを受け取ります。 プロパティは、アクティブ化イベントの種類を示します。 この例は、 ファイル のアクティブ化イベントを処理するように設定されています。

function onActivatedHandler(eventArgs) {
   if (eventArgs.detail.kind == Windows.ApplicationModel.Activation.ActivationKind.file) 
   {
       // TODO: Handle file activation.

       // The number of files received is eventArgs.detail.files.size
       // The first file is eventArgs.detail.files[0].name
   }
}

注釈

このオブジェクトは、ActivationKindファイルの場合に WinJS.Application.Onactivated または Windows.UI.WebUI.WebUIApplication.activated イベントのイベント ハンドラーを実装するときにアクセスされます。 ファイル コントラクトに対してアプリがアクティブ化されている場合は、Files プロパティを介してアプリに渡される StorageFile オブジェクトを使用してデータにアクセスする必要があることに注意してください。 アプリにファイルの場所へのアクセス許可がない可能性があるため、ファイルのパスにアクセスしないでください。

注意

このクラスはアジャイルではありません。つまり、スレッド モデルとマーシャリング動作を考慮する必要があります。 詳細については、「 スレッドとマーシャリング (C++/CX)」を参照してください。

バージョン履歴

Windows のバージョン SDK バージョン 追加された値
1607 14393 ユーザー

プロパティ

ActivatedOperation

アプリのアクティブ化操作を取得します。

CurrentlyShownApplicationViewId

現在表示されているアプリ ビューの識別子を取得します。

Files

アプリがアクティブ化されたファイルを取得します。

Kind

アクティブ化の種類を取得します。

NeighboringFilesQuery

アプリがアクティブ化されたファイルの近隣ファイルを取得します。

PreviousExecutionState

アクティブ化される前のアプリの実行状態を取得します。

SplashScreen

スプラッシュ スクリーンからアクティブ化されたアプリへの切り替えに関する情報を提供するスプラッシュ スクリーン オブジェクトを取得します。

User

アプリがアクティブ化されたユーザーを取得します。

Verb

アクティブ化されたファイルに関連付けられているアクションを取得します。

適用対象

こちらもご覧ください