Skip to content

How to open Page on Startup, which will than be recognized by OnNavigatedTo in ViewModel #2962

Answered by dansiegel
anzeko123 asked this question in .NET MAUI
Discussion options

You must be logged in to vote

OnInitialized does still exist though it is the improper place to Navigate in .NET MAUI. You will want to use OnAppStart which is clearly documented here and is used the in repo test app.

.OnAppStart(navigationService => navigationService.CreateBuilder()
.AddSegment<SplashPageViewModel>()
.NavigateAsync(HandleNavigationError))

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@anzeko123
Comment options

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