public override void OnFrameworkInitializationCompleted() { AutoBringIntoViewExtension.Initialise(); if (!Design.IsDesignMode) { MainViewModel.Instance = new MainViewModel(_global !); if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) { desktop.MainWindow = new MainWindow { DataContext = MainViewModel.Instance }; RxApp.MainThreadScheduler.Schedule( async() => { await _backendInitialiseAsync(); MainViewModel.Instance !.Initialize(); }); } } base.OnFrameworkInitializationCompleted(); }
public override void OnFrameworkInitializationCompleted() { AutoBringIntoViewExtension.Initialise(); if (!Design.IsDesignMode) { MainViewModel.Instance = new MainViewModel(_global !); if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) { desktop.MainWindow = new MainWindow { DataContext = MainViewModel.Instance }; } } base.OnFrameworkInitializationCompleted(); }