fixed default loading.

This commit is contained in:
Clint Rutkas 2020-03-11 11:37:27 -07:00 committed by Lavius Motileng
parent 0a20be85ab
commit 69e7a581fd
3 changed files with 6 additions and 7 deletions

View File

@ -6,9 +6,7 @@ namespace Microsoft.PowerToys.Settings.UI
{
public App()
{
this.Initialize();
Initialize();
}
}
}

View File

@ -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
-->
<winui:NavigationViewItem x:Uid="Shell_Main" Icon="Home" helpers:NavHelper.NavigateTo="views:MainPage" />
<winui:NavigationViewItem x:Uid="Shell_Test1" Icon="Play" helpers:NavHelper.NavigateTo="views:Test1Page" />

View File

@ -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));
}
}
}