public partial class MainWindow : Window
{
public MainWindow()
{
Loaded += OnLoaded;
InitializeComponent();
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
}
private void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs)
{
}
private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
{
WebBrowser.Navigate(new Uri("http://192.168.0.1:38880/webclient/index.html"));
}
}
Podczas próby wyświetlenia w kontrolce Webbrowser w WPF adresu Uri dostaję zawsze ten sam błąd:
An unhandled exception of type 'System.InvalidOperationException' occurred in PresentationFramework.dll,
dodatkowa informacja to:
Cannot create more than one System.Windows.Application instance in the same AppDomain.