StartBrowserAppAsync Method
Configures browser backend, loads avalonia javascript modules and creates a single view lifetime from the passed parameter.
Definition
Namespace: Avalonia.Browser
Assembly: Avalonia.Browser (in Avalonia.Browser.dll)
- C#
- VB
- F#
public static Task StartBrowserAppAsync(
this AppBuilder builder,
string mainDivId,
BrowserPlatformOptions? options = null
)
<ExtensionAttribute>
Public Shared Function StartBrowserAppAsync (
builder As AppBuilder,
mainDivId As String,
Optional options As BrowserPlatformOptions = Nothing
) As Task
[<ExtensionAttribute>]
static member StartBrowserAppAsync :
builder : AppBuilder *
mainDivId : string *
?options : BrowserPlatformOptions
(* Defaults:
let _options = defaultArg options null
*)
-> Task
Parameters
- AppBuilder
- Application builder.
- String
- ID of the html element where avalonia content should be rendered.
- BrowserPlatformOptions (Optional)
- Browser backend specific options.
Return Value
TaskUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type AppBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).