Compartilhar via


CoreWebView2Profile.PreferredColorScheme Property

Definition

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

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

Property Value

Remarks

This sets the color scheme for WebView2 UI like dialogs, prompts, and menus by setting the media feature prefers-color-scheme. The default value for this is @CoreWebView2PreferredColorScheme$.Auto, which will follow whatever color scheme the OS is currently set to.

Applies to