WebUIFileSavePickerActivatedEventArgs 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
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
- 繼承
- 屬性
- 實作
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命名空間參考提供檔案服務。
當您在ActivationKind為fileSavePicker時,實作WinJS.Application.Onactivated或Windows.UI.WebUI.WebUIApplication.activated事件的事件處理常式時,就會存取此物件。
注意
這個類別不是敏捷式的,這表示您需要考慮其執行緒模型和封送處理行為。 如需詳細資訊,請參閱 執行緒和封送處理 (C++/CX) 。
版本歷程記錄
Windows 版本 | SDK 版本 | 已新增值 |
---|---|---|
1607 | 14393 | User |
屬性
ActivatedOperation |
取得應用程式啟動的作業。 |
CallerPackageFamilyName |
取得呼叫端封裝的系列名稱。 |
EnterpriseId |
取得擁有檔案的企業識別碼。 |
FileSavePickerUI |
取得當使用者儲存檔案並選取應用程式做為儲存位置時所顯示之檔案選擇器的信件箱 UI。 |
Kind |
取得啟用類型。 |
PreviousExecutionState |
取得應用程式啟動前的執行狀態。 |
SplashScreen |
取得啟動顯示畫面物件,提供從啟動顯示畫面轉換至啟動應用程式的相關資訊。 |
User |
取得啟動應用程式的使用者。 |