SingletonSean / wpf-tutorials

Source code for SingletonSean WPF tutorials on YouTube.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ParameterNavigationService as INavigationService

torreto71 opened this issue · comments

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