WinUI-Gallery
WinUI-Gallery copied to clipboard
Child window sample forces parent window navigation
Which version of the app?
WinUI 3 Gallery
Description
Parent window navigates back to Home when creating a child window.
- Go to the Multiple windows sample page.
- Click the Create new Window button.
- Both parent and child window navigates to Home.
Screenshots
No response
Windows version
No response
Additional context
We shouldn't use MainWindow for the child window sample anymore.
protected override void OnNavigatedTo(NavigationEventArgs e)
{
((NavigationViewItem)App.MainWindow.NavigationView.MenuItems.First()).IsSelected = true;
...
I can update the samples and replace MainWindow with a plain Window, given the green light. 🙂