Compartilhar via


WebView2.DefaultBackgroundColor Propriedade

Definição

Obtém ou define a cor a ser usada como a tela de fundo do WebView2 quando o conteúdo HTML não especifica uma cor.

public:
 property Color DefaultBackgroundColor { Color get(); void set(Color value); };
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="WebView2::sc_controllerDefaultBackgroundColor")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="WebView2::sc_controllerDefaultBackgroundColor")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="WebView2::sc_controllerDefaultBackgroundColor")]
Color DefaultBackgroundColor();

void DefaultBackgroundColor(Color value);
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="WebView2::sc_controllerDefaultBackgroundColor")]
public Color DefaultBackgroundColor { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="WebView2::sc_controllerDefaultBackgroundColor")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="WebView2::sc_controllerDefaultBackgroundColor")] set; }
var color = webView2.defaultBackgroundColor;
webView2.defaultBackgroundColor = color;
Public Property DefaultBackgroundColor As Color
<WebView DefaultBackgroundColor="predefinedColorName"/>
- or -
<WebView DefaultBackgroundColor="#rgb"/>
- or -
<WebView DefaultBackgroundColor="#argb"/>
- or -
<WebView DefaultBackgroundColor="#rrggbb"/>
- or -
<WebView DefaultBackgroundColor="#aarrggbb"/>
- or -
<WebView DefaultBackgroundColor="sc#scR,scG,scB"/>
- or -
<WebView DefaultBackgroundColor="sc#scA,scR,scG,scB"/>

Valor da propriedade

A cor da tela de fundo.

Atributos
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Aplica-se a