共用方式為


WebUIFileSavePickerActivatedEventArgs 類別

定義

提供使用者透過檔案選擇器儲存檔案並選取應用程式作為位置時所引發之啟動事件的相關資訊。

C#/C++/VB 此類型會顯示為 FileSavePickerActivatedEventArgs

public ref class WebUIFileSavePickerActivatedEventArgs sealed : IFileSavePickerActivatedEventArgs, IFileSavePickerActivatedEventArgs2, IActivatedEventArgsDeferral
public ref class WebUIFileSavePickerActivatedEventArgs sealed : IActivatedEventArgsWithUser, IFileSavePickerActivatedEventArgs, IFileSavePickerActivatedEventArgs2, IActivatedEventArgsDeferral
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
class WebUIFileSavePickerActivatedEventArgs final : IFileSavePickerActivatedEventArgs, IFileSavePickerActivatedEventArgs2, IActivatedEventArgsDeferral
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
class WebUIFileSavePickerActivatedEventArgs final : IActivatedEventArgsWithUser, IFileSavePickerActivatedEventArgs, IFileSavePickerActivatedEventArgs2, IActivatedEventArgsDeferral
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
public sealed class WebUIFileSavePickerActivatedEventArgs : IFileSavePickerActivatedEventArgs, IFileSavePickerActivatedEventArgs2, IActivatedEventArgsDeferral
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
public sealed class WebUIFileSavePickerActivatedEventArgs : IActivatedEventArgsWithUser, IFileSavePickerActivatedEventArgs, IFileSavePickerActivatedEventArgs2, IActivatedEventArgsDeferral
Public NotInheritable Class WebUIFileSavePickerActivatedEventArgs
Implements IActivatedEventArgsDeferral, IFileSavePickerActivatedEventArgs, IFileSavePickerActivatedEventArgs2
Public NotInheritable Class WebUIFileSavePickerActivatedEventArgs
Implements IActivatedEventArgsDeferral, IActivatedEventArgsWithUser, IFileSavePickerActivatedEventArgs, IFileSavePickerActivatedEventArgs2
繼承
Object Platform::Object IInspectable WebUIFileSavePickerActivatedEventArgs
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

範例

檔案選擇器範例示範如何回應fileSavePicker啟動的事件。

// fileSavePicker activated event handler
function activated(eventObject) {
    // Identify whether app is launched for fileSavePicker
    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 包含 webUIFileSavePickerActivatedEventArgs 物件。

備註

深入瞭解如何提供您的應用程式作為使用者可在快速入門中儲存檔案的位置:透過Windows.Storage.Pickers.Provider命名空間參考提供檔案服務

當您在ActivationKindfileSavePicker時,實作WinJS.Application.OnactivatedWindows.UI.WebUI.WebUIApplication.activated事件的事件處理常式時,就會存取此物件。

注意

這個類別不是敏捷式的,這表示您需要考慮其執行緒模型和封送處理行為。 如需詳細資訊,請參閱 執行緒和封送處理 (C++/CX)

版本歷程記錄

Windows 版本 SDK 版本 已新增值
1607 14393 User

屬性

ActivatedOperation

取得應用程式啟動的作業。

CallerPackageFamilyName

取得呼叫端封裝的系列名稱。

EnterpriseId

取得擁有檔案的企業識別碼。

FileSavePickerUI

取得當使用者儲存檔案並選取應用程式做為儲存位置時所顯示之檔案選擇器的信件箱 UI。

Kind

取得啟用類型。

PreviousExecutionState

取得應用程式啟動前的執行狀態。

SplashScreen

取得啟動顯示畫面物件,提供從啟動顯示畫面轉換至啟動應用程式的相關資訊。

User

取得啟動應用程式的使用者。

適用於

另請參閱