Skip to content

UWP -> WinUI3: How is navigating to pages done now? #4584

Closed Answered by mikebattista
myokeeh asked this question in Q&A
Discussion options

You must be logged in to vote

The NavigationService still provides navigation. Instead of ViewModelLocator.Current, you can get an instance through dependency injection by adding INavigationService to a class constructor, or you can call App.GetService<INavigationService>(). Add a Content Grid page and look at ContentGridViewModel for an example.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@myokeeh
Comment options

@mikebattista
Comment options

@myokeeh
Comment options

Answer selected by mikebattista
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants