I had a request for how to get CEFSharp working by calling it straight from XAML. This post assumes that you have read my other post. In order to get the XAML component working you need to add the files as before to your output “Debug” and “Release” directories (see other post for how to do this).
Once you have done this then follow the steps below:
1/ Add in the references (as in previous project) by Right-Clicking on the “References” section of the project and then “Add Reference…”. You will also need to add in the “locales” folder to your output directories or you will get an error (mine was a VSHost.exe crash but yours may differ)
2/ Select the “Browse” tab and select the two CEFSharp files you have just added:
3/Goto the XAML page you wish to add a CEFSharp browser to and insert a reference to the name space (NB. I did get an error appear in the “Error List” at this point and I suspect you will to. Ignore this for now.):
4/ To instantiate an actual control simply add the following:
I got errors listed in the output window but if you hit Run it should load up a window like this:
From here you should be able to use it with all the usual commands. For more information on CEFSharp please visit the CEFSharp GitHub page. If you have any requests please contact me in the comments.