Skip to content

ParameterNavigationService as INavigationService #1

@torreto71

Description

@torreto71

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions