Cefsharp Chrominumwebbrowser not working in WPF - wpf

Hi I am new to cefsharp and tried using Cefsharp chromium web browser .
when ever i tried to call the webbrowser it throws an exception like below
Could not load file or assembly 'CefSharp.Wpf, PublicKeyToken=40c4b6fc221f4138' or one of its dependencies. The system cannot find the file specified.'
But i have added the reference cefsharp.wpf in project
What do i miss here ?
And if i tried from codebehinf too the same issue occurs.
I just had the below piece of code next to InnitializeComponent.
ChromiumWebBrowser browser = new ChromiumWebBrowser();

Manually i counldn't resolve the issue in my working solution.
As a work around what i did is as #amaitland suggested i cloned a copy of CefSharp Minimal Example from here and used the Minimal Example for WPF solution.
I just copied all the logic from my solution tand pasted it in the minimal expansion and updated it .
Now ChromiumWebBrowser works fine for me ( Only after using that Minimal example provided by cefsharp )..

In Application > Properties > Build
Change Check "Prefer 32-bits"

Related

WPF Webbrowser cannot display Angular

I am trying to embed an Angular web app in WPF.
I have followed the steps here to create a very basic angular application.
Then I created a brand new WPF application, added a WebBrowser control and set its Source property equal to the URL of the angular application.
I found the following post but it did not help.
I get the following error when the WPF application starts.
"Unable to get property 'apply' of undefined or null reference"
in the vendor.bundle.js
The default WebBrowser object that .Net applications are using it is IE7 I guess..
I've found a good answer here for making WebBrowser to use IE10 or IE11 (Edge).
Another solution is to use third-party WebBrowsers, this is an old article but I think it might help.
After trial and error the meta tag fixed it. Originally I was putting outside the head tag. Adding it to head tag fixed it.

Can't get Dynamic Data Display working with WPF Browser Application

Can I get Dynamic Data Display library working with WPF Browser App? I'm getting "Target Invocation Exception" when attempting to launch the app, regular desktop WPF app runs just fine.
Update 1: "That assembly does not allow partially trusted callers." is the error, got it by adding D3's chart plotter dynamically. Looking into it now.
Fixed by switching to "This is a full trust application" option in the Security tab of my project's properties. May not be appropriate for everyone, check for the potential implications of it. Did the trick for me though.

qooxdoo qx.ui.mobile.list package not loading

I have just started evaluating qooxdoo + phonegap for a mobile application and have completed the getting started manual and created a test application which works as expected. The default app created has page1 with a button to navigate to page2 and back.
I have edited application.js to show a list by copying the list sample script into it but the list creation fails with error TypeError: Cannot read property 'List' of undefined
I have tried looking into the documentation to see if i have to make any changes to the app to load the list package but have not able to find anything. Can someone point me in the right direction?
Did you call
./generate.py source
after adding the qx.Mobile list to your application?
Calling ./generate.py source did not help ./generate.py source-all did the trick

Xilium.CefGlue in Winforms application not working properly with ogg

I'm trying to integrate the Xilium.CefGlue browser into an existing project, but i don't seem to get it working with ogg. I'm using the latest versions of the Xilium.CefGlue(xilium-xilium.cefglue-3caa551bd830) and the Cef binary (cef_binary_3.1384.1045). Everything works great when running the projects in the Xilium.CefGlue solution.
To make sure the problem is not caused by my other project, i started a new Winforms project, added references to Xilium.CefGlue.dll, Xilium.CefGlue.Demo.dll and Xilium.CefGlue.WindowsForms.dll. I use the same code in my Program.cs file as used in CefGlue.Client project in the examples, and in my form i create a new CefBrowser and add it directly to my controls. I also placed the needed ceflib files in the correct location.
Now, when running the application and loading a webpage, everything seems to hang unless i change the SingleProcess to true in the CefSettings in my Program.cs. However, when loading another page which contains html5 video (ogg), the page is not getting rendered. I do notice that the interaction is there, because i can start the video by clicking in the center of the page where a button should be located. I can hear the video playing, but the page simply stays blank.
Loading the same page in the CefGlue.Client does work like it should. Now, when i change the setting SingleProcess to true in the example project CefGlue.client, the same thing occurs, so i guess it must have something to do with this.
Anyone got any ideas on what is going wrong?
Thanks,
Andy
Found the answer somewhere else by Sébastien Frippiat:
it seems that using SingleProcess=false doesn't work when debugging with Visual Studio (should be related to Visual Studio using a executable called project_exe.vshost.exe instead of project_exe.exe).
So i changed my CefSettings to this:
var settings = new CefSettings
{
BrowserSubprocessPath = #"C:\CefGlueBrowser\CefGlueBrowser\bin\x86\Debug\CefGlueBrowser.exe",
SingleProcess = false,
MultiThreadedMessageLoop = true,
LogSeverity = CefLogSeverity.Default,
LogFile = "CefGlue.log",
};
That seems to fix it for debugging.
Just disable Visual Studio Hosting Process and you wont have problem for debugging
http://msdn.microsoft.com/en-us/library/ms185330(v=vs.80).aspx

Why isn't my shared resource file working in my Silverlight RIA project?

I'm working on a Silverlight project with the WCF RIA Services beta. I'm using the BlahDomainService.metadata.cs file to validate a field by adding validation attributes, e.g. [RegularExpression]. It was working so I'm trying to put the Error message in a resource file and now it isn't working. The RegEx validation isn't being run on the client, though it is being run on the server.
Any idea what might be causing this?
In the generated code file on the client, I see this error:
// Unable to generate the following attribute due to the following error(s):
//
// - The validation attribute 'System.ComponentModel.DataAnnotations.RegularExpressionAttribute' declared ErrorMessageResourceName='RegExError' which was not found on declared ErrorMessageResourceType 'Blah.Web.Resources.SharedResources'.
// [RegularExpressionAttribute("yawn", ErrorMessageResourceName = "RegExError", ErrorMessageResourceType = typeof(Blah.Web.Resources.SharedResources))]
How I got where I am
I created the SharedResources.resx (and Vs created SharedResources.Designer.cs) file in the .Web project in a folder called Resources. In the Silverlight project, I created a Web folder and in that a Resources folder. To this Resources folder, I did Add > Existing Item and then added the SharedResources.resx and .Designer.cs using the Add as Link option. The idea was that this would keep the namespaces the same for the two resources classes. I then edited the .csproj file to make the .Designer.cs file a dependency of the .resx file, using the Silverlight Business Application template as a reference.
I built the solution and tested it and the RegEx validation throws no error, which is bad. Then I found the message above. To verify that my linking was working, in Home.xaml.cs, I typed:
System.Diagnostics.Debug.WriteLine(Web.Resources.SharedResources.RegExError);
and saw the error in the Output window in VS. I also submitted the changes to the service and in the EntitiesInError, on the VaidationErrors, I can see the error message, so I know it's working server-side. It's just the client-side that isn't. Any idea why it's not working?
You also have add a resources (.resx) as a link in the client silverlight project for the web project.
See template Silverlight Bussiness Application in VS 2010. It has a very good sample.
Everything was okay except that I hadn't set the AccessModifier for the .resx to Public. Once I'd done that and Rebuilt All, it worked.

Resources