FileSavePickerActivatedEventArgs クラス

定義

ユーザーがファイル ピッカーを使用してファイルを保存し、その場所としてアプリを選択したときに発生するアクティブ化されたイベントに関する情報を提供します。

Javascript この型は 、WebUIFileSavePickerActivatedEventArgs として表示されます。

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

Windows の要件

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

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

// fileSavePicker activated event handler
protected override void OnFileSavePickerActivated(FileSavePickerActivatedEventArgs args)
{
    var FileSavePickerPage = new SDKTemplate.FileSavePickerPage();
    FileSavePickerPage.Activate(args);
}

// Overloaded method to respond to fileSavePicker events
internal void Activate(FileSavePickerActivatedEventArgs args)
{
    // Perform tasks to prepare your app to display its file picker page

    // Get file picker UI
    fileSavePickerUI = args.FileSavePickerUI;

    Window.Current.Content = this;
    this.OnNavigatedTo(null);
    Window.Current.Activate();
}

C# の場合、 argsApplication オブジェクトの OnFileSavePickerActivated オーバーライドでは、FileSavePickerActivatedEventArgs オブジェクトが参照されます。 OnFileSavePickerActivated オーバーライドは App.xaml.cs ファイルにあり、Activateメソッドはファイル ピッカー コントラクト サンプルの FileSavePickerPage.xaml.cs ファイルにあります。

注釈

ユーザーが Windows.Storage.Pickers.Provider 名前空間リファレンスでファイルを保存できる場所としてアプリを提供する方法の詳細について説明します。

FileSavePickerActivatedEventArgs オブジェクトは、ユーザーがファイル ピッカーを使用してファイルを保存し、その場所としてアプリを選択すると、アプリのアクティブ化ポイント ハンドラーに渡されます。 この種類のアクティブ化は、Kind プロパティによって返される ActivationKind.FileSavePicker 値によって示されます。

JavaScript で記述されたアプリは、 Windows.UI.WebUI.webUIApplication.activated イベントをリッスンして処理する必要があります。

C++、C#、または Visual Basic を使用する UWP アプリでは、通常 、Application オブジェクトのメソッドをオーバーライドしてアクティブ化ポイントを実装します。 既定のテンプレート app.xaml 分離コード ファイルには常に OnLaunched のオーバーライドが含まれますが、 OnFileSavePickerActivated などの他のアクティブ化ポイントのオーバーライドの定義は、アプリ コードに依存します。

アクティブ化シナリオに関連するすべての アプリケーション オーバーライドは、実装で Window.Activate を呼び出す必要があります。

バージョン履歴

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

プロパティ

CallerPackageFamilyName

このアプリを起動したアプリのパッケージ ファミリ名。

EnterpriseId

ファイルを所有するエンタープライズの ID を取得します。

FileSavePickerUI

ユーザーがファイルを保存するときに表示されるファイル ピッカーのレターボックス UI を取得し、保存場所としてアプリを選択します。

Kind

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

PreviousExecutionState

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

SplashScreen

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

User

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

適用対象

こちらもご覧ください