Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParameterNavigationService as INavigationService #1

Open
torreto71 opened this issue Dec 21, 2021 · 0 comments
Open

ParameterNavigationService as INavigationService #1

torreto71 opened this issue Dec 21, 2021 · 0 comments

Comments

@torreto71
Copy link

Hello,

I am currently studying your WPF tutorial on mvvm navigation. I sow all your videos on that subject.
I am trying to enforce this method with dependency injection.
Navigate throw different views is ok, but I can't pass parameters to specific ViewModel.
What is the best solution?

  • implement INavigationService with parameter?
  • Use a store?
  • Use an asyncCommand?

My aim:
In my application I use a modal view to enter a password.
this view is used with 2 different account Type/Pwd ( admin / user )
Click on first button of IHM => admin pwd check.
Click on second button of IHM => user pwd check.
Actually i pass my passwordManager to the loginViewModel.
I would like to pass an enum to the loginViewModel to know witch password to check.
And get back information (error/admin/user) to the homeviewModel ( that call loginViewModel)

Thanks by advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant