AppBuilderBase<TAppBuilder>.

Start<TMainWindow>(Func<object>) Method

Summary

Starts the application with an instance of TMainWindow.
Namespace
Avalonia.Controls
Containing Type
AppBuilderBase<TAppBuilder>

Syntax

[Obsolete("Use either lifetimes or AppMain overload. See see https://github.com/AvaloniaUI/Avalonia/wiki/Application-lifetimes for details")]
public void Start<TMainWindow>(Func<object> dataContextProvider = null) 
    where TMainWindow : Window, new()

Attributes

Type Description
ObsoleteAttribute

Type Parameters

Name Description
TMainWindow The window type.

Parameters

Name Type Description
dataContextProvider Func<object> A delegate that will be called to create a data context for the window (optional).

Return Value

Type Description
void