CoreWebView2SaveAsKind Enum

Definition

Specifies Save As kind selection options for ICoreWebView2SaveAsUIShowingEventArgs.

        For HTML documents, we support 3 Save As kinds: HTML_ONLY, SINGLE_FILE and
        COMPLETE. For non-HTML documents, you must use DEFAULT. MIME types of `text/html` and
        `application/xhtml+xml` are considered HTML documents.
C#
public enum CoreWebView2SaveAsKind
Inheritance
CoreWebView2SaveAsKind

Fields

Name Value Description
Default 0

Default kind to save non-HTML content. If this kind is selected for an HTML page, the behavior is the same as the HTML_ONLY kind.

HtmlOnly 1

Save the page as HTML. Only the top-level document is saved, excluding subresources.

SingleFile 2

Save the page as MHTML.

Complete 3

Save the page as HTML and download the page-related source files (for example: CSS, JavaScript, images, etc.) in a directory with the same filename prefix.

Remarks

For HTML documents, we support 3 Save As kinds: HtmlOnly, SingleFile and Complete. For non-HTML documents, you must use Default. MIME types of text/html and application/xhtml+xml are considered HTML documents.

Applies to

Product Versions
WebView2 .NET 1.0.2739.15, 1.0.2792.45, 1.0.2849.39, 1.0.2903.40, 1.0.2957.106, 1.0.3065.39
WebView2 .NET Prerelease 1.0.2526, 1.0.2584, 1.0.2646, 1.0.2730, 1.0.2783, 1.0.2839, 1.0.2895, 1.0.2950, 1.0.3079, 1.0.3116