ChromiumWebBrowser.CreateBrowserAsync Method |
Version 105.3.390
Create the underlying CEF browser. The address and request context passed into the constructor
will be used. If a
Action<T> delegate was passed
into the constructor it will not be called as this method overrides that value internally.
Namespace:
CefSharp.OffScreen
Assembly:
CefSharp.OffScreen (in CefSharp.OffScreen.dll) Version: 105.3.390.0 (105.3.390.0)
Syntaxpublic Task<IBrowser> CreateBrowserAsync(
IWindowInfo windowInfo = null,
IBrowserSettings browserSettings = null
)
public:
Task<IBrowser^>^ CreateBrowserAsync(
IWindowInfo^ windowInfo = nullptr,
IBrowserSettings^ browserSettings = nullptr
)
Parameters
- windowInfo (Optional)
- Type: CefSharp.IWindowInfo
Window information used when creating the browser - browserSettings (Optional)
- Type: CefSharp.IBrowserSettings
Browser initialization settings
Return Value
Type:
Task<IBrowser>
A
Task<TResult> that represents the creation of the underlying CEF browser (
IBrowser instance.
When the task completes then the CEF Browser will have been created and you can start performing basic tasks.
Note that the control's
BrowserInitialized event will be invoked after this task completes.
ExceptionsException | Condition |
---|
Exception | An instance of the underlying offscreen browser has already been created, this method can only be called once. |
See Also