How to clear WebBrowser control in WPF
I found this. Anyone have anything better?
if (wb != null)
{
if (e.NewValue != null)
wb.NavigateToString(e.NewValue as string);
else
wb.Navigate("about:blank");
}
EDIT:
As poby mentioned in the comments, for .NET 4+ use:
if (wb != null)
{
if (e.NewValue != null)
wb.NavigateToString(e.NewValue as string);
else
wb.Navigate((Uri)null);
}