How do I suppress script errors when using the WPF WebBrowser control?

前端 未结 8 1805
余生分开走
余生分开走 2020-12-02 09:34

I have a WPF application that uses the WPF WebBrowser control to display interesting web pages to our developers on a flatscreen display (like a news feed).

The tro

8条回答
  •  青春惊慌失措
    2020-12-02 10:24

    The problem here is that the WPF WebBrowser did not implement this property as in the 2.0 control.

    Your best bet is to use a WindowsFormsHost in your WPF application and use the 2.0's WebBrowser property: SuppressScriptErrors. Even then, you will need the application to be full trust in order to do this.

    Not what one would call ideal, but it's pretty much the only option currently.

提交回复
热议问题