如何阻止WPF WebBrowser加载页面?

mpe*_*pen 1 wpf wpf-controls

我看到了GoBack,GoForward,Refresh和Navigate的方法,但没有"停止"或"取消".我该怎么做?

Vin*_*til 6

使用可以使用InvokeScript方法而不是WebBrowser控制来停止页面导航.

yourWebBrowser.InvokeScript("eval", "document.execCommand('Stop');");
Run Code Online (Sandbox Code Playgroud)