From 349c620aa58a93c255afda1c3eb704f0080da3a3 Mon Sep 17 00:00:00 2001 From: chylex <info@chylex.com> Date: Sun, 19 Apr 2015 23:25:58 +0200 Subject: [PATCH] Delayed Home page loading to improve perceived performance --- BackupEssentials/MainWindow.xaml.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/BackupEssentials/MainWindow.xaml.cs b/BackupEssentials/MainWindow.xaml.cs index 27f33ba..12cbdba 100644 --- a/BackupEssentials/MainWindow.xaml.cs +++ b/BackupEssentials/MainWindow.xaml.cs @@ -32,8 +32,9 @@ namespace BackupEssentials{ Loaded += (sender, args) => { if (splashScreen != null)splashScreen.Close(new TimeSpan()); - + Dispatcher.BeginInvoke(DispatcherPriority.Loaded,new Action(() => { + ShowPage(typeof(Home)); DataStorage.SetupForSaving(true); DataStorage.Load(); })); @@ -48,8 +49,6 @@ namespace BackupEssentials{ DataStorage.Save(true); ExplorerIntegration.Refresh(true); }; - - ShowPage(typeof(Home)); } private void ButtonWindowCloseClick(object sender, RoutedEventArgs e){