Aracılığıyla paylaş


CoreWebView2Settings Class

Definition

Defines properties that enable, disable, or modify WebView features.

public class CoreWebView2Settings
type CoreWebView2Settings = class
Public Class CoreWebView2Settings
Inheritance
CoreWebView2Settings

Remarks

Changes to IsGeneralAutofillEnabled and IsPasswordAutosaveEnabled will take effect immediately, while other setting changes made after NavigationStarting event do not apply until the next top-level navigation.

Properties

AreBrowserAcceleratorKeysEnabled

Determines whether browser-specific accelerator keys are enabled.

AreDefaultContextMenusEnabled

Determines whether the default context menus are shown to the user in WebView.

AreDefaultScriptDialogsEnabled

Determines whether WebView renders the default JavaScript dialog box.

AreDevToolsEnabled

Determines whether the user is able to use the context menu or keyboard shortcuts to open the DevTools window.

AreHostObjectsAllowed

Determines whether host objects are accessible from the page in WebView.

AreRemoteObjectsAllowed
HiddenPdfToolbarItems

Used to customize the PDF toolbar items.

IsBuiltInErrorPageEnabled

Determines whether to disable built in error page for navigation failure and render process failure.

IsGeneralAutofillEnabled

Determines whether general form information will be saved and autofilled.

IsNonClientRegionSupportEnabled

The IsNonClientRegionSupportEnabled property enables web pages to use the app-region CSS style. Disabling/Enabling the IsNonClientRegionSupportEnabled takes effect after the next navigation. Defaults to false.

When this property is TRUE, then all the non-client region features will be enabled: Draggable Regions will be enabled, they are regions on a webpage that are marked with the CSS attribute app-region: drag/no-drag. When set to drag, these regions will be treated like the window's title bar, supporting dragging of the entire WebView and its host app window; the system menu shows upon right click, and a double click will trigger maximizing/restoration of the window size.

When set to false, all non-client region support will be disabled. The app-region CSS style will be ignored on web pages.

IsPasswordAutofillEnabled

Determines whether password information will be saved and autofilled.

IsPasswordAutosaveEnabled

Determines whether password information will be autosaved.

IsPinchZoomEnabled

Determines the ability of the end users to use pinching motions on touch input enabled devices to scale the web content in the WebView2.

IsReputationCheckingRequired

Determines whether SmartScreen is enabled when visiting web pages

IsScriptEnabled

Determines whether running JavaScript is enabled in all future navigations in the WebView.

IsStatusBarEnabled

Determines whether the status bar is displayed.

IsSwipeNavigationEnabled

Determines whether the end user to use swiping gesture on touch input enabled devices to navigate in WebView2.

IsWebMessageEnabled

Determines whether communication from the host to the top-level HTML document of the WebView is allowed.

IsZoomControlEnabled

Determines whether the user is able to impact the zoom of the WebView.

PreferredBackgroundTimerWakeInterval
PreferredForegroundTimerWakeInterval
PreferredIntensiveTimerWakeInterval
PreferredOverrideTimerWakeInterval
UserAgent

Determines WebView2's User Agent.

Applies to