mik*_*t21 7 c# wpf webbrowser-control
我正在使用以下链接中的代码:在WPF WebBrowser控件中显示字符串中的html
它很好用,除非我删除包含html的项目,e.NewValue
变成了null
我得到一个例外.有没有办法将WebBrowser控件返回到空白屏幕?
mik*_*t21 16
我找到了这个.谁有更好的东西?
if (wb != null)
{
if (e.NewValue != null)
wb.NavigateToString(e.NewValue as string);
else
wb.Navigate("about:blank");
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
13133 次 |
最近记录: |