Exemple #1
0
        private void wb_Main_BeforeNewWindow(object sender, WebBrowserExtendedNavigatingEventArgs e)
        {
            e.Cancel = true;

            dynamic browser = sender;

            browser.Navigate(e.Url);
        }
        private void OnBeforeNewWindow(string bstrUrl, out bool Cancel)
        {
            var eventArgs = new WebBrowserExtendedNavigatingEventArgs(bstrUrl, null);

            if (null != BeforeNewWindow)
            {
                BeforeNewWindow(_webBrowser, eventArgs);
            }
            Cancel = eventArgs.Cancel;
        }
        private void OnBeforeNavigate(string URL, string TargetFrameName, out bool Cancel)
        {
            var eventArgs = new WebBrowserExtendedNavigatingEventArgs(URL, TargetFrameName);

            if (null != BeforeNavigate)
            {
                BeforeNavigate(_webBrowser, eventArgs);
            }
            Cancel = eventArgs.Cancel;
        }