Partager via


CoreWebView2Profile Class

Definition

public class CoreWebView2Profile
type CoreWebView2Profile = class
Public Class CoreWebView2Profile
Inheritance
CoreWebView2Profile

Properties

CookieManager

Get the CoreWebView2CookieManager which Creates, adds or updates, gets, or or view the cookies for the current profile.

DefaultDownloadFolderPath

The default download folder path.

IsGeneralAutofillEnabled

Determines whether general form information will be saved and autofilled.

IsInPrivateModeEnabled

InPrivate mode is enabled or not.

IsPasswordAutosaveEnabled

Determines whether password information will be autosaved.

PreferredColorScheme

The PreferredColorScheme property sets the overall color scheme of the WebView2s associated with this profile.

PreferredTrackingPreventionLevel

The PreferredTrackingPreventionLevel property allows you to control levels of tracking prevention for WebView2 which are associated with a profile. This level would apply to the context of the profile. That is, all WebView2s sharing the same profile will be affected and also the value is persisted in the user data folder.

See CoreWebView2TrackingPreventionLevel for descriptions of levels.

ProfileName

The name of the profile.

ProfilePath

Full path of the profile directory.

Methods

AddBrowserExtensionAsync(String)

Add a browser extension to the current user profile from extensionFolderPath.

ClearBrowsingDataAsync()

Clear the entirety of the browsing data associated with the profile it is called on. It clears the data regardless of timestamp.

ClearBrowsingDataAsync(CoreWebView2BrowsingDataKinds, DateTime, DateTime)

Clear the browsing data for the specified dataKinds between the startTime and endTime. Overload the ClearBrowsingDataAsync method to allow for additional time parameters.

ClearBrowsingDataAsync(CoreWebView2BrowsingDataKinds)

Clear the browsing data of the associated profile.

ClearCustomDataPartitionAsync(String)

Clears all DOM storage and cookies in the specified custom data partition.

Delete()

Delete this profile and close the corresponding CoreWebView2s.

GetBrowserExtensionsAsync()

Gets a snapshot of the set of extensions on current user profile.

See CoreWebView2BrowserExtension for descriptions of browser extensions.

GetNonDefaultPermissionSettingsAsync()

Invokes the handler with a collection of all nondefault permission settings.

SetPermissionStateAsync(CoreWebView2PermissionKind, String, CoreWebView2PermissionState)

Sets permission state for the given permission kind and origin asynchronously.

Events

Deleted

Raised when profile is marked for deletion.

Applies to