コード例 #1
0
        public void Close()
        {
            WinInetHelper.EndBrowserSession();

            if (signal != null)
            {
                signal.Dispose();
                signal = null;
            }

            needToClose = true;
            Window.Close();
        }
コード例 #2
0
        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;
        }