WebView2.DefaultBackgroundColor Eigenschaft

Definition

Ruft die Farbe ab, die als WebView2-Hintergrund verwendet werden soll, wenn der HTML-Inhalt keine Farbe angibt, oder legt diese fest.

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"/>

Eigenschaftswert

Die Hintergrundfarbe.

Attribute
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Gilt für: