gpt4 book ai didi

c# - 如何在 Webview2 中使用透明度?

转载 作者:行者123 更新时间:2023-12-04 12:32:31 26 4
gpt4 key购买 nike

在 C# 中,如何在 Webview2 中使用透明度?有可能吗?

它在 WebBrowser 中有效,但在 WebView2 中无效?

Comparison

最佳答案

您可以更改 WebView2.DefaultBackgroundColor (默认为白色)到透明以具有透明背景:

webView2.DefaultBackgroundColor = System.Drawing.Color.Transparent;

WebView2 WPF sample app演示了这个特性。 WebView2 WPF sample app with a transparent background set for the WebView2

关于c# - 如何在 Webview2 中使用透明度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67838739/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com