StartupUri Property
<Application x:Class="StartupShutdownDemo.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> <Application.Resources> </Application.Resources> </Application>
OnStartup
protected override async void OnStartup(StartupEventArgs e) { await Init(); }
References
http://www.blackwasp.co.uk/WPFStartupShutdown.aspx