I want to embed the current Gecko in my WPF-Project. I know there is the possibility with the Winforms-Host and the Skybound-Gecko-Library.
But I do not use the standard
This is an old question, but I came up with a pseudo-solution to add GeckoFX as a XAML tag such as:
This can be accomplished by simply wrapping the whole thing in a UserControl such as:
XAML:
C#:
public partial class Browser : UserControl
{
WindowsFormsHost host = new WindowsFormsHost();
GeckoWebBrowser browser = new GeckoWebBrowser();
public Browser()
{
InitializeComponent();
Xpcom.Initialize("Firefox");
browser.Navigate("http://www.google.com");
host.Child = browser;
border.Child = host;
}
}
Now, you can use the tag in WPF, in the same project where the UserControl exists.
I have been trying to get this to work as a Control in a library, so I can easily port it to any other project/solution, but it keeps giving me an error about mozglue.dll missing. I suspect this is due to the Xpcom.Initialize("Firefox") but I need to investigate further.