/// <summary>
            /// Notifies the <see cref="P:Parent"/> that a navigation is occurring.
            /// </summary>
            /// <param name="webBrowser">The top-level or frame <see cref="T:WebBrowser"/> corresponding to the navigation.</param>
            /// <param name="url">The URL to which the browser is navigating.</param>
            /// <param name="targetFrameName">The frame in which the resource will be displayed, or <see langword="null"/> if no named frame is targeted for the resource.</param>
            /// <param name="postData">Data to send to the server if the HTTP POST transaction is being used.</param>
            /// <param name="headers">Specifies the additional HTTP headers to send to the server (HTTP URLs only). The headers can specify such things as the action required of the server, the type of data being passed to the server, or a status code.</param>
            /// <returns>
            /// <see langword="true"/> to cancel the navigation operation, or to <see langword="false"/> to allow it to proceed.
            /// </returns>
            public override bool Navigating(WebBrowser webBrowser, string url, string targetFrameName, byte[] postData, string headers)
            {
                if (this.Parent.AllowNavigation || !this.hasNavigated)
                {
                    if (targetFrameName == null)
                    {
                        targetFrameName = string.Empty;
                    }

                    if (headers == null)
                    {
                        headers = string.Empty;
                    }

                    Uri uri = new Uri(url ?? string.Empty);

                    var e = new WebBrowserNavigatingEventArgs(webBrowser, uri, targetFrameName ?? string.Empty, postData, headers);

                    this.Parent.OnNavigating(e);

                    return(e.Cancel);
                }
                else
                {
                    return(true);
                }
            }
 private void WebBrowserEx_Navigating(object sender, PauloMorgado.Windows.WebBrowser.WebBrowserNavigatingEventArgs e)
 {
     Trace.WriteLine(string.Format("URL={0}, TargetFrameName={1}, Cancel={2}", e.Url, e.TargetFrameName, e.Cancel), string.Format("[{0}] WebBrowserEx.Navigating", this.instance));
 }