WebUIFileOpenPickerActivatedEventArgs クラス

定義

ユーザーがアプリによって提供されるファイルまたはフォルダーを選択しようとしたときに発生するアクティブ化されたイベントに関する情報を提供します。

C#/C++/VB この種類は 、FileOpenPickerActivatedEventArgs として表示されます。

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

Windows の要件

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

ファイル ピッカーのサンプルでは、fileOpenPicker アクティブ化イベントに応答する方法を示します。

// File open picker activated event handler
function activated(eventObject) {
    // Identify whether app is launched for fileOpenPicker
    if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.fileOpenPicker) {
        // Perform tasks to prepare your app to display its file picker page

        // Get file picker UI
        fileOpenPickerUI = eventObject.detail.fileOpenPickerUI;

        eventObject.setPromise(WinJS.UI.processAll().then(function () {
            // Navigate to either the first scenario or to the last running scenario
            // before suspension or termination.
            var url = scenarios[0].url;
            return WinJS.Navigation.navigate(url, fileOpenPickerUI);
        }));
    }
}

// Register the activated event handler
WinJS.Application.addEventListener("activated", activated, false);

JavaScript の場合は、 eventObject webUIFileOpenPickerActivatedEventArgs オブジェクトが含まれます。

注釈

アプリから選択するファイルをユーザーに提供する方法については、「クイック スタート: Windows.Storage.Pickers.Provider 名前空間リファレンス」を参照してファイル サービスを提供する方法について説明します。

ActivationKindfileOpenPicker の場合、WinJS.Application.Onactivated または Windows.UI.WebUI.WebUIApplication.activated イベントのイベント ハンドラーを実装すると、このオブジェクトにアクセスします。

注意

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

バージョン履歴

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

プロパティ

ActivatedOperation

アプリがアクティブ化された操作を取得します。

CallerPackageFamilyName

呼び出し元のパッケージのファミリ名を取得します。

FileOpenPickerUI

ユーザーがアプリによって提供されるファイルまたはフォルダーを選択するときに表示されるファイル ピッカーのレターボックス UI を取得します。

Kind

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

PreviousExecutionState

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

SplashScreen

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

User

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

適用対象

こちらもご覧ください