From 69e7a581fd26023e8a06f8869af311448399036b Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Wed, 11 Mar 2020 11:37:27 -0700 Subject: [PATCH] fixed default loading. --- src/core/Microsoft.PowerToys.Settings.UI/App.xaml.cs | 4 +--- .../Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml | 2 -- .../Views/ShellPage.xaml.cs | 7 +++++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/core/Microsoft.PowerToys.Settings.UI/App.xaml.cs b/src/core/Microsoft.PowerToys.Settings.UI/App.xaml.cs index 42b3dc3a39..c428d39887 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/App.xaml.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI/App.xaml.cs @@ -6,9 +6,7 @@ namespace Microsoft.PowerToys.Settings.UI { public App() { - this.Initialize(); + Initialize(); } - - } } diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml index 9e87ed3273..4928a2cc84 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml +++ b/src/core/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml @@ -46,8 +46,6 @@ More on Segoe UI Symbol icons: https://docs.microsoft.com/windows/uwp/style/segoe-ui-symbol-font Or to use an IconElement instead of a Symbol see https://github.com/Microsoft/WindowsTemplateStudio/blob/master/docs/projectTypes/navigationpane.md Edit String/en-US/Resources.resw: Add a menu item title for each page - - TODO: Why isn't main page loading by default --> diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml.cs b/src/core/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml.cs index 8f2b64746d..7bd91d2882 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI/Views/ShellPage.xaml.cs @@ -1,5 +1,7 @@ using System; - +using Microsoft.PowerToys.Settings.UI.Activation; +using Microsoft.PowerToys.Settings.UI.Helpers; +using Microsoft.PowerToys.Settings.UI.Services; using Microsoft.PowerToys.Settings.UI.ViewModels; using Windows.UI.Xaml.Controls; @@ -14,9 +16,10 @@ namespace Microsoft.PowerToys.Settings.UI.Views public ShellPage() { InitializeComponent(); - + DataContext = ViewModel; ViewModel.Initialize(shellFrame, navigationView, KeyboardAccelerators); + NavigationService.Navigate(typeof(MainPage)); } } }