Windows应用程序表格:如何设置webBrowser的缩放级别?

时间:2018-11-06 07:32:28

标签: c# .net winforms windows-forms-designer

我一直在寻找一种方法来设置Windows窗体应用程序的缩放级别,并在其中导航一些URL。因此,我使用以下网址打开了网址:

  

webBrowser1.Navigate(“ url”)

,我想根据我选择的URL设置webBrowser1的缩放级别。我看过以下链接,但都没有用:

https://social.msdn.microsoft.com/Forums/en-US/69f57099-428a-4b17-9b8e-c05ec269c480/zoom-inout-while-designing-forms-in-windows-forms-designer?forum=winformsdesigner&fbclid=IwAR3aZdGsVf4lE5Lw9E3x7grp1dYoWZIUHmhVzJmU8S2BzzwnzaV20Hv5HoE

https://weblog.west-wind.com/posts/2016/Aug/22/Detecting-and-Setting-Zoom-Level-in-the-WPF-WebBrowser-Control

Problems having content in webbrowser scale automatically in Windows Form Application

1 个答案:

答案 0 :(得分:0)

请尝试这个

webBrowser1.Document.Body.Style =“ zoom:50%”;