I want to use CefGlue in my WPF app.
Most important for me is that the integrated browser does not crash or freeze my app.
What's your recommendation, use WPF control or WinForms/WindowsFormsHost ?
Moderator: fddima
AndyB wrote:I have implemented now WinForms (windowed rendering) and WPF (offscreen) based on your sample projects.
WinForms works great so far, i published a beta version of my app today with this option, hope i get no issues reported back.
WPF basically works, but:
1) Tooltips are displayed a bit "shake".
I think because in the sample, each change of the tooltip adds an additional event handler to _tooltipTimer.Tick.
After changing this it works fine.
2) The context menu does not close when i click on a free area.
I worked around this by displaying a custom context menu.
3) No touch screen support.
That's a key requirement for me because my app is used on tablets (Microsoft Surface)
I have implemented a custom touch scroll, using Manipulation events and SendMouseWheelEvent, works ok for me.
4) No good HighDPI support, text looks too bold and blurry.
Maybe i take a look on this some time. CefSharp works fine on this point, so i probably look how they do the rendering.
Thank you and all others for this awesome project!
AndyB wrote:for ex. how to get a value back from a javascript function (XHR works good for me now, no need for potential "buggy" custom IPC implementation)
AndyB wrote:I think the problem with WPF/OSR is that using WinForms and WindowsFormsHost is easy and seems to work fine. No big motivation for developers to make it working perfect.
My experience when i had issues with the WPF version... "just use WinForms" is the most given answer.
There is probably peoples think that WPF control is better suit to their WPF
AndyB wrote:Yes, i execute JavaScript code from VB.NET. I have about 10 web automation scripts to auto fill fields, click buttons and links...
I think you wrote somewhere in this forum that you recommend using XHR for communication between JavaScript and C#.
It took me some time to get this working, as with most things at the end it's not too difficult. A working sample probably would have saved me lot of time.
Your second approach sounds also to be a good solution. Yes, 1a "some unique message id" and 1e is very similar to the XHR way.
AndyB wrote:There is probably peoples think that WPF control is better suit to their WPF
I had some trouble with WinForms and WindowsFormsHost in CefSharp.
- mentioned app freezes which i figured out may be caused by my bad
- closing browser takes a few seconds, probably caused by the CefSharp WCF IPC communication.
If it works fine with CefGlue WinForms/WindowsFormsHost then i feel comfortable with this now.
Users browsing this forum: No registered users and 58 guests