Use the below code for WPF and place it in Geckofx-WPF GeckoWebBrowser.cs
/// <summary>
/// Gets the <see cref="Url"/> currently displayed in the web browser.
/// Use the <see cref="Navigate(string)"/> method to change the URL.
/// </summary>
[BrowsableAttribute(false)]
public Uri Url
{
get
{
if (_webNav == null)
return null;
nsIURI locationComObject = _webNav.GetCurrentURIAttribute();
var uri = locationComObject.ToUri();
Xpcom.FreeComObject(ref locationComObject);
return uri ?? new Uri("about:blank");
}
}
You can then access the url as
geckoWebbrowser.Url;