ChromiumWebBrowser Constructor (HtmlString, IBrowserSettings, IRequestContext, Boolean, Action<IBrowser>, Boolean) |
Version 109.1.110
Namespace:
CefSharp.OffScreen
Assembly:
CefSharp.OffScreen (in CefSharp.OffScreen.dll) Version: 109.1.110.0 (109.1.110.0)
Syntaxpublic ChromiumWebBrowser(
HtmlString html,
IBrowserSettings browserSettings = null,
IRequestContext requestContext = null,
bool automaticallyCreateBrowser = true,
Action<IBrowser> onAfterBrowserCreated = null,
bool useLegacyRenderHandler = true
)
public:
ChromiumWebBrowser(
HtmlString^ html,
IBrowserSettings^ browserSettings = nullptr,
IRequestContext^ requestContext = nullptr,
bool automaticallyCreateBrowser = true,
Action<IBrowser^>^ onAfterBrowserCreated = nullptr,
bool useLegacyRenderHandler = true
)
Parameters
- html
- Type: CefSharp.Web.HtmlString
html string to be initially loaded in the browser. - browserSettings (Optional)
- Type: CefSharp.IBrowserSettings
The browser settings to use. If null, the default settings are used. - requestContext (Optional)
- Type: CefSharp.IRequestContext
See RequestContext for more details. Defaults to null - automaticallyCreateBrowser (Optional)
- Type: System.Boolean
automatically create the underlying Browser - onAfterBrowserCreated (Optional)
- Type: System.Action<IBrowser>
Use as an alternative to the BrowserInitialized event. If the underlying Chromium Embedded Framework (CEF) browser is created successfully,
this action is guranteed to be called after the browser created where as the BrowserInitialized event may be called before
you have a chance to subscribe to the event as the CEF Browser is created async. (Issue https://github.com/cefsharp/CefSharp/issues/3552).
- useLegacyRenderHandler (Optional)
- Type: System.Boolean
For those using ScreenshotAsync(Boolean, PopupBlending) or ScreenshotOrNull(PopupBlending) then
this must be true, for those using CaptureScreenshotAsync(Nullable<CaptureScreenshotFormat> , Nullable<Int32> , Viewport) this can be false.
Lower memory usage when false. Defaults to true for backwards compatability.
Exceptions
See Also