Skip to content

Using PageResolver to pass data in Shell. #37

Answered by matt-goldman
spuliy asked this question in Q&A
Discussion options

You must be logged in to vote

@spuliy personally im not sure you need to use this package if your using shell, as it has dependency resolution built in (i dont use shell though, so cant really comment on this) - https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/dependency-injection?view=net-maui-8.0#automatic-dependency-resolution

Does it work if you just use -

Navigation.PushAsync<MyPage>(new Item 
{ 
    Property = "Something"
 });

Instead of -

Shell.Current.Navigation.PushAsync<MyPage>(new Item 
{ 
    Property = "Something"
 });

Agree here - using Shell.Current.Navigation.PushAsync doesn't really make sense. Shell is within the navigation stack (where you would use PushAsync), whereas navigation within

Replies: 2 comments 3 replies

Comment options

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

@IeuanWalker
Comment options

@matt-goldman
Comment options

Answer selected by spuliy
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants