共用方式為


CoreWebView2SaveAsUIShowingEventArgs Class

Event args for the CoreWebView2.SaveAsUIShowing event.

Summary

Members Description
AllowReplace Indicates whether to allow replace old file when it already exists in the target save file path.
Cancel Indicates whether to cancel the save as before download.
ContentMimeType Mime type of content to be saved.
Kind The option to save content to different document. CoreWebView2SaveAsKind
SaveAsFilePath The absolute full path of save as location.
SuppressDefaultDialog Indicates if the system default dialog will be suppressed.
GetDeferral Gets a Deferral object.

Properties

AllowReplace

bool AllowReplace

Indicates whether to allow replace old file when it already exists in the target save file path. Setting this property to TRUE allows existing files to be replaced. Setting this property to FALSE will not replace existing files and will return CoreWebView2SaveAsUIResult.FileAlreadyExists.

Cancel

bool Cancel

Indicates whether to cancel the save as before download. Set this property to TRUE to cancel the Save As action and prevent the download from starting. CoreWebView2.ShowSaveAsUIAsync returns CoreWebView2SaveAsUIResult.Cancelled.

ContentMimeType

readonly string ContentMimeType

Mime type of content to be saved.

Kind

CoreWebView2SaveAsKind Kind

The option to save content to different document. CoreWebView2SaveAsKind If it is not allowed for the current document, method CoreWebView2.ShowSaveAsUIAsync returns CoreWebView2SaveAsUIResult.InvalidPath.

SaveAsFilePath

string SaveAsFilePath

The absolute full path of save as location. It includes the file name and extension. If it is not valid (for example, the root drive does not exist), Save As is denied, and CoreWebView2SaveAsUIResult.InvalidPath is returned. If the associated download completes successfully, a target file is saved at this location. If the Kind property is CoreWebView2SaveAsKind.Complete, there will be an additional directory with resources files.

SuppressDefaultDialog

bool SuppressDefaultDialog

Indicates if the system default dialog will be suppressed. When this property is FALSE, the default Save As dialog is shown and the values assigned through SaveAsFilePath, AllowReplace and Kind are ignored when the event args invoke completed. When it is TRUE, the system dialog is skipped and all assigned values are used.

Methods

GetDeferral

Deferral GetDeferral()

Gets a Deferral object. This will defer showing the default Save As dialog. Use this to Complete the event at a later time to perform a Save As operation.

Referenced by