Transferring information from one presentation model to another

alt text

I am using the MV-VM architectural pattern.

I want my program to have two kinds, View A and View Bed and . I run a program with a View Take A . View B shows the program when you double-click an item in the View A .

How should I structure my program so that I can do this?

+5
source share
2 answers

Is there one ViewModel:

  • ParentViewModel
    • ChildViewModel1
      • Isvisible
      • A command that toggles the ChildViewModel IsVisible property
    • Childviewmodel2
      • Isvisible

and View like:

  • Parentview
    • ViewPart1
      • ChildViewModel1.IsVisible( BooleanToVisibilityConverter)
      • , ,
    • ViewPart2
      • ChildViewModel1.IsVisible( BooleanToVisibilityConverter)

.

+2

BookLibrary WPF Application Framework (WAF). / ViewModels. , , ViewModel "Lend To", .

+1

All Articles