I want to use OffScreen Rendering in CefSharp.WinForms.ChromiumWebBrowser
. Should it be rewritten to CefSharp.OffScreen.ChromiumWebBrowser
?
The main idea is to preload a web page and show it on the WinForms window. Currently in my solution it takes a few seconds to fully render the web page on the window. I want the logic - when I load the new url, the previous one should be visible on the screen, then, after some time (5 seconds) I want to show the newly loaded url, which was rendering during that 5 seconds
CodePudding user response:
There is no out of the box solution for using OffScreen Rendering
in WinForms
. You would need to implement that yourself. It's no small task and I'd suggest looking for alternate solutions before undertaking that task.
You can call Control.CreateControl() in WinForms
to force the creation of a ChromiumWebBrowser
instance.
chromiumWebBrowser.CreateControl();
You could for instance create a ChromiumWebBrowser
in the background and then replace the existing instance when loaded.
Further reading at https://github.com/cefsharp/CefSharp/issues/1406#issuecomment-616226653