[英]Is there a way to use OffScreen Rendering in CefSharp.WinForms.ChromiumWebBrowser
I want to use OffScreen Rendering in CefSharp.WinForms.ChromiumWebBrowser
.我想在
CefSharp.WinForms.ChromiumWebBrowser
中使用 OffScreen Rendering。 Should it be rewritten to CefSharp.OffScreen.ChromiumWebBrowser
?是否应该将其重写为
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主要思想是预加载 web 页面并将其显示在 WinForms window 上。目前在我的解决方案中,需要几秒钟才能在 window 上完全呈现 web 页面。我想要逻辑 - 当我加载新的 url 时,之前的一个应该在屏幕上可见,然后,一段时间后(5 秒)我想显示新加载的 url,它在那 5 秒内呈现
There is no out of the box solution for using OffScreen Rendering
in WinForms
.在
WinForms
中使用OffScreen Rendering
没有开箱即用的解决方案。 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.您可以在
WinForms
中调用Control.CreateControl()来强制创建ChromiumWebBrowser
实例。
chromiumWebBrowser.CreateControl();
You could for instance create a ChromiumWebBrowser
in the background and then replace the existing instance when loaded.例如,您可以在后台创建一个
ChromiumWebBrowser
,然后在加载时替换现有实例。
Further reading at https://github.com/cefsharp/CefSharp/issues/1406#issuecomment-616226653进一步阅读https://github.com/cefsharp/CefSharp/issues/1406#issuecomment-616226653
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.