Exemplo n.º 1
0
        private void OnWindowOpen(object sender, WindowOpenEventArgs eventArgs)
        {
            if (eventArgs.BrowserWindowTarget == BrowserWindowTarget.Self)
            return;

              var webBrowser = CreateBrowser();

              eventArgs.TargetView = webBrowser;
              Prepare (webBrowser, eventArgs.Url, eventArgs.BrowserWindowTarget);
        }
Exemplo n.º 2
0
    //
    // NAVIGATION EVENTS
    // 
    public void OnNewWindow (WindowOpenEventArgs eventArgs)
    {
      ArgumentUtility.CheckNotNull ("eventArgs", eventArgs);

      if (WindowOpen != null)
        WindowOpen (this, eventArgs);
    }
Exemplo n.º 3
0
        public override void NewWindow3(ref object ppDisp, ref bool Cancel, uint dwFlags, string bstrUrlContext, string bstrUrl)
        {
            var ppDispOriginal = ppDisp;
              var eventArgs = new WindowOpenEventArgs (BrowserWindowTarget.PopUp, Cancel, new Uri (bstrUrl, UriKind.Absolute));

              _browserControl.OnNewWindow (eventArgs);

              if (eventArgs.TargetView != null) // set a custom web browser instance to control where the web page should be rendered
            ppDisp = ((TridentWebBrowserBase) eventArgs.TargetView).Application ?? ppDispOriginal;

              Cancel = eventArgs.Cancel;
        }