CoreWebView2Profile.EnhancedSecurityModeState Property

Definition

The EnhancedSecurityModeState property allows you to control whether Enhanced Security Mode is enabled or disabled for WebView2 instances associated with a profile. This applies to all WebViews sharing the same profile. The configuration is not persisted to the user data folder. The property is reset when the profile is recreated.

The default value is CoreWebView2EnhancedSecurityModeState.Disabled.

When set to Disabled, Enhanced Security Mode is disabled. When set to Enabled, Enhanced Security Mode is enabled.

See CoreWebView2EnhancedSecurityModeState for descriptions of states.

public Microsoft.Web.WebView2.Core.CoreWebView2EnhancedSecurityModeState EnhancedSecurityModeState { get; set; }
member this.EnhancedSecurityModeState : Microsoft.Web.WebView2.Core.CoreWebView2EnhancedSecurityModeState with get, set
Public Property EnhancedSecurityModeState As CoreWebView2EnhancedSecurityModeState

Property Value

Remarks

Changes apply immediately to new navigation. Existing pages require a reload for the change to take effect.

Applies to