Platforms to show: All Mac Windows Linux Cross-Platform

Back to DesktopWebView2ControlMBS control.

DesktopWebView2ControlMBS.AdditionalBrowserArguments as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Additional browser arguments can be specified to change the behavior of the WebView.

These will be passed to the browser process as part of the command line. See Run Chromium with Flags for more information about command line switches to browser process. If the app is launched with a command line switch --edge-webview-switches=xxx the value of that switch (xxx in the above example) will also be appended to the browser process command line. Certain switches like --user-data-dir are internal and important to WebView. Those switches will be ignored even if specified. If the same switches are specified multiple times, the last one wins. There is no attempt to merge the different values of the same switch, except for disabled and enabled features. The features specified by --enable-features and --disable-features will be merged with simple logic: the features will be the union of the specified features and built-in features, and if a feature is disabled, it will be removed from the enabled features list. App process's command line --edge-webview-switches value are processed after the additionalBrowserArguments parameter is processed. Certain features are disabled internally and can't be enabled. If parsing failed for the specified switches, they will be ignored. Default is to run browser process with no extra flags.
(Read and Write property)

DesktopWebView2ControlMBS.AllowSingleSignOnUsingOSPrimaryAccount as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The AllowSingleSignOnUsingOSPrimaryAccount property is used to enable single sign on with Azure Active Directory (AAD) resources inside WebView using the logged in Windows account and single sign on with web sites using Microsoft account associated with the login in Windows account.

Default is disabled. Universal Windows Platform apps must also declare enterpriseCloudSSO restricted capability for the single sign on to work.
(Read and Write property)

DesktopWebView2ControlMBS.areBrowserAcceleratorKeysEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Whether all accelerator keys are enabled.

When this setting is set to false, it disables all accelerator keys that access features specific to a web browser, including but not limited to:

  • Ctrl-F and F3 for Find on Page
  • Ctrl-P for Print
  • Ctrl-R and F5 for Reload
  • Ctrl-Plus and Ctrl-Minus for zooming
  • Ctrl-Shift-C and F12 for DevTools
  • Special keys for browser functions, such as Back, Forward, and Search

It does not disable accelerator keys related to movement and text editing, such as:

  • Home, End, Page Up, and Page Down
  • Ctrl-X, Ctrl-C, Ctrl-V
  • Ctrl-A for Select All
  • Ctrl-Z for Undo

Those accelerator keys will always be enabled unless they are handled in the AcceleratorKeyPressed event.
This setting has no effect on the AcceleratorKeyPressed event. The event will be fired for all accelerator keys, whether they are enabled or not.

The default value for AreBrowserAcceleratorKeysEnabled is true.

Needs WebView2 in version 1.0.864.35 or newer.
(Read and Write property)

DesktopWebView2ControlMBS.AreDefaultContextMenusEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The AreDefaultContextMenusEnabled property is used to prevent default context menus from being shown to user in WebView.

It is true by default.
(Read and Write property)

DesktopWebView2ControlMBS.AreDefaultScriptDialogsEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
AreDefaultScriptDialogsEnabled is used when loading a new HTML document.

If set to false, then WebView won't render the default JavaScript dialog box (Specifically those shown by the JavaScript alert, confirm, prompt functions and beforeunload event). Instead, if an event handler is set via add_ScriptDialogOpening, WebView will send an event that will contain all of the information for the dialog and allow the host app to show its own custom UI. It is true by default.
(Read and Write property)

DesktopWebView2ControlMBS.AreDevToolsEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
AreDevToolsEnabled controls whether the user is able to use the context menu or keyboard shortcuts to open the DevTools window.

It is true by default.
(Read and Write property)

DesktopWebView2ControlMBS.AreHostObjectsAllowed as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The AreHostObjectsAllowed property is used to control whether host objects are accessible from the page in WebView.

It is true by default.
(Read and Write property)

DesktopWebView2ControlMBS.BrowserExecutableFolder as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The path to the browser executable to use.

Must be assigned very early, e.g. in Configure event, before initialization of the control runs.

Use browserExecutableFolder to specify whether WebView2 controls use a fixed or installed version of the WebView2 Runtime that exists on a user machine. To use a fixed version of the WebView2 Runtime, pass the relative folder path that contains the fixed version of the WebView2 Runtime to browserExecutableFolder. To create WebView2 controls that use the installed version of the WebView2 Runtime that exists on user machines, pass a empty string to browserExecutableFolder. In this scenario, the API tries to find a compatible version of the WebView2 Runtime that is installed on the user machine (first at the machine level, and then per user) using the selected channel preference. The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\. When such a path is used, the API fails with HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED).
(Read and Write property)

DesktopWebView2ControlMBS.BrowserVersionString as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The browser version info of the current environment, including channel name if it is not the stable channel.

This matches the format of the AvailableCoreWebView2BrowserVersionString API. Channel names are 'beta', 'dev', and 'canary'.
(Read only property)

DesktopWebView2ControlMBS.ContainsFullScreenElement as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Indicates if the WebView contains a fullscreen HTML element.

(Read only property)

DesktopWebView2ControlMBS.CookieManager as WebView2CookieManagerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 23.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Gets the cookie manager object associated with this webview.

Requires WebView2 version 1.0.705.50 from January 2021.
(Read only property)

See also:

DesktopWebView2ControlMBS.CookieManager as WebView2CookieManagerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 23.1 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Gets the cookie manager object associated with this web view.

(Read only property)

See also:

DesktopWebView2ControlMBS.DefaultBackgroundColor as Color

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The DefaultBackgroundColor property is the color WebView renders underneath all web content.
Example

// set transparent in Opened event:

web.DefaultBackgroundColor = &cFFFFFFFF

This means WebView renders this color when there is no web content loaded such as before the initial navigation or between navigations. This also means web pages with undefined css background properties or background properties containing transparent pixels will render their contents over this color. Web pages with defined and opaque background properties that span the page will obscure the DefaultBackgroundColor and display normally. The default value for this property is white to resemble the native browser experience.

The Color is specified by the color that represents an RGBA value. The A represents an Alpha value, meaning DefaultBackgroundColor can be transparent. In the case of a transparent DefaultBackgroundColor WebView will render hosting app content as the background. This Alpha value is not supported on Windows 7. Any A value other than 255 will result in an exception on Windows 7. It is supported on all other WebView compatible platforms.

Semi-transparent colors are not currently supported by this API and setting DefaultBackgroundColor to a semi-transparent color will fail with an exception. The only supported alpha values are 0 and 255, all other values will result in exception. DefaultBackgroundColor can only be an opaque color or transparent.

Requires version 1.0.774.44 of Webview2 or newer.
Can't be set in Open event as the control is not yet ready.
(Read and Write property)

DesktopWebView2ControlMBS.DocumentTitle as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The title for the current top level document.

If the document has no explicit title or is otherwise empty, a default that may or may not match the URI of the document will be used.
(Read only property)

DesktopWebView2ControlMBS.IsBuiltInErrorPageEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The IsBuiltInErrorPageEnabled property is used to disable built in error page for navigation failure and render process failure.

It is true by default. When disabled, blank page will be shown when related error happens.
(Read and Write property)

DesktopWebView2ControlMBS.IsGeneralAutofillEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Whether autofill for information like names, street and email addresses, phone numbers, and arbitrary input is enabled.

This excludes password and credit card information. When IsGeneralAutofillEnabled is false, no suggestions appear, and no new information is saved. When IsGeneralAutofillEnabled is true, information is saved, suggestions appear and clicking on one will populate the form fields. The default value is true.

Needs WebView2 in version 1.0.902.49 or newer.
(Read and Write property)

DesktopWebView2ControlMBS.IsPasswordAutosaveEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Whether autosave for password information is enabled.

The IsPasswordAutosaveEnabled property behaves independently of the IsGeneralAutofillEnabled property. When IsPasswordAutosaveEnabled is false, no new password data is saved and no Save/Update Password prompts are displayed. However, if there was password data already saved before disabling this setting, then that password information is auto-populated, suggestions are shown and clicking on one will populate the fields. When IsPasswordAutosaveEnabled is true, password information is auto-populated, suggestions are shown and clicking on one will populate the fields, new data is saved, and a Save/Update Password prompt is displayed. The default value is false.

Needs WebView2 in version 1.0.902.49 or newer.
(Read and Write property)

DesktopWebView2ControlMBS.IsPinchZoomEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Enable or disable pitch zoom.

Pinch-zoom, referred to as "Page Scale" zoom, is performed as a post-rendering step, it changes the page scale factor property and scales the surface the web page is rendered onto when user performs a pinch zooming action.

It does not change the layout but rather changes the viewport and clips the web content, the content outside of the viewport isn't visible onscreen and users can't reach this content using mouse.
The IsPinchZoomEnabled property enables or disables the ability of the end user to use a pinching motion on touch input enabled devices to scale the web content in the WebView2. It defaults to TRUE. When set to FALSE, the end user cannot pinch zoom after the next navigation. Disabling/Enabling IsPinchZoomEnabled only affects the end user's ability to use pinch motions and does not change the page scale factor. This API only affects the Page Scale zoom and has no effect on the existing browser zoom properties (IsZoomControlEnabled and ZoomFactor) or other end user mechanisms for zooming.

Needs WebView2 in version 1.0.902.49 or newer.
(Read and Write property)

DesktopWebView2ControlMBS.IsScriptEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
Controls if JavaScript execution is enabled in all future navigations in the WebView.

This only affects scripts in the document; scripts injected with ExecuteScript will run even if script is disabled. It is true by default.
(Read and Write property)

DesktopWebView2ControlMBS.IsStatusBarEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
IsStatusBarEnabled controls whether the status bar will be displayed.

The status bar is usually displayed in the lower left of the WebView and shows things such as the URI of a link when the user hovers over it and other information. It is true by default.
(Read and Write property)

DesktopWebView2ControlMBS.IsWebMessageEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The IsWebMessageEnabled property is used when loading a new HTML document.

If set to true, communication from the host to the WebView's top level HTML document is allowed via PostWebMessageAsJson, PostWebMessageAsString, and window.chrome.webview's message event (see PostWebMessageAsJson documentation for details). Communication from the WebView's top level HTML document to the host is allowed via window.chrome.webview's postMessage function and add_WebMessageReceived method (see add_WebMessageReceived documentation for details). If set to false, then communication is disallowed. PostWebMessageAsJson and PostWebMessageAsString will fail with E_ACCESSDENIED and window.chrome.webview.postMessage will fail by throwing an instance of an Error object. It is true by default.
(Read and Write property)

DesktopWebView2ControlMBS.IsZoomControlEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The IsZoomControlEnabled property is used to prevent the user from impacting the zoom of the WebView.

It is true by default. When disabled, user will not be able to zoom using ctrl+/- or ctrl+mouse wheel, but the zoom can be set via ZoomFactor API.
(Read and Write property)

DesktopWebView2ControlMBS.Language as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The default language that WebView will run with.

It applies to browser UIs like context menu and dialogs. It also applies to the accept-languages HTTP header that WebView sends to web sites. It is in the format of language[-country] where language is the 2 letter code from ISO 639 and country is the 2 letter code from ISO 3166.
(Read and Write property)

DesktopWebView2ControlMBS.ProcessID as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The process id of the browser process that hosts the WebView.

(Read only property)

DesktopWebView2ControlMBS.TargetCompatibleBrowserVersion as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The version of the Edge WebView2 Runtime binaries required to be compatible with the calling application.

This defaults to the Edge WebView2 Runtime version that corresponds with the version of the SDK the application is using. The format of this value is the same as the format of the BrowserVersionString property and other BrowserVersion values. Only the version part of the BrowserVersion value is respected. The channel suffix, if it exists, is ignored. The version of the Edge WebView2 Runtime binaries actually used may be different from the specified TargetCompatibleBrowserVersion. They are only guaranteed to be compatible. You can check the actual version on the BrowserVersionString property on the control.
(Read and Write property)

DesktopWebView2ControlMBS.URL as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The URI of the current top level document.

This value potentially changes as a part of the SourceChanged event firing for some cases such as navigating to a different site or fragment navigations. It will remain the same for other types of navigations such as page reloads or history.pushState with the same URL as the current page.

If assigned, calls LoadURL method.
(Read and Write property)

DesktopWebView2ControlMBS.UserAgent as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The User Agent.

The default value is the default User Agent of the Microsoft Edge browser.

This property may be overridden if the User-Agent header is set in a request. If the parameter is empty the User Agent will not be updated and the current User Agent will remain.

Needs WebView2 in version 1.0.864.35 or newer.
(Read and Write property)

DesktopWebView2ControlMBS.UserDataFolder as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The user data folder location.
Example

Dim w As DesktopWebView2ControlMBS // your control

Dim SupportFolder As FolderItem = SpecialFolder.ApplicationData.Child("MyApp")
SupportFolder.CreateAsFolder

w.UserDataFolder = SupportFolder.NativePath

Must be assigned very early, e.g. in Configure event, before initialization of the control runs.

You may specify the userDataFolder to change the default user data folder location for WebView2. The path is either an absolute file path or a relative file path that is interpreted as relative to the compiled code for the current process. For UWP apps, the default user data folder is the app data folder for the package. For non-UWP apps, the default user data ({Executable File Name}.WebView2) folder is created in the same directory next to the compiled code for the app. WebView2 creation fails if the compiled code is running in a directory in which the process does not have permission to create a new directory. The app is responsible to clean up the associated user data folder when it is done.
(Read and Write property)

DesktopWebView2ControlMBS.ZoomFactor as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property WebView2 MBS WinFrameworks Plugin 21.5 ❌ No ✅ Yes ❌ No ❌ No Desktop only
The ZoomFactor property.

(Read and Write property)

The items on this page are in the following plugins: MBS WinFrameworks Plugin.


The biggest plugin in space...