public void Close() { WinInetHelper.EndBrowserSession(); if (signal != null) { signal.Dispose(); signal = null; } needToClose = true; Window.Close(); }
public EmbeddedBrowser() { WinInetHelper.SupressCookiePersist(); result = new BrowserResult(); SetDefaultResult(); Window = new Window() { Width = 600, Height = 800, WindowStartupLocation = WindowStartupLocation.CenterScreen, }; Window.Closing += Window_Closing; // Create WebBrowser webBrowser = new WebBrowser(); webBrowser.Navigating += WebBrowser_Navigating; // Add browser as content of the window Window.Content = webBrowser; }