Click or drag to resize

CefInitializeAsync Method

Version 94.4.20
Initializes CefSharp with user-provided settings. This method allows you to wait for OnContextInitialized to be called before continuing. It's important to note that Initialize and Shutdown MUST be called on your main application thread (typically the UI thread). If you call them on different threads, your application will hang. See the documentation for Cef.Shutdown() for more details.

Namespace:  CefSharp
Assembly:  CefSharp.Core (in CefSharp.Core.dll) Version: 94.4.20.0
Syntax
public static Task<bool> InitializeAsync(
	CefSettingsBase settings,
	bool performDependencyCheck = true,
	IBrowserProcessHandler browserProcessHandler = null
)

Parameters

settings
Type: CefSharpCefSettingsBase
CefSharp configuration settings.
performDependencyCheck (Optional)
Type: SystemBoolean
Check that all relevant dependencies available, throws exception if any are missing
browserProcessHandler (Optional)
Type: CefSharpIBrowserProcessHandler
The handler for functionality specific to the browser process. Null if you don't wish to handle these events

Return Value

Type: TaskBoolean
returns a Task that can be awaited. true if successful; otherwise, false. If false check the log file for possible errors
Remarks
If successful then the Task will be completed successfully when OnContextInitialized is called. If successful then the continuation will happen syncrionously on the CEF UI thread.
See Also