I'm working on a windows WPF application using MVVM Light. As far as for switching views and navigation purposes, is there set classes readily available? Right now, I'm using a MainViewController to load other views with datatemplate and messenger class. But i'm not sure if its the best practice.
0
votes
Why not use the MvvmLight Messenger for that?
– Sir Rufo
how will the messenger be used? just to trigger calls and load the right controller in the main controller?
– my779
@my779 you seem to be on the right track. messenger also allows calls to be "directed" because of the subscription/broadcast concept. An answer with some actual code can be found: stackoverflow.com/a/26266708/3109213
– Stunna
try to implement the Navigation Service to suit your needs, take a look here stackoverflow.com/questions/28966819/…
– SamTh3D3v
possible duplicate of WPF MVVM navigate views
– goobering
1 Answers
0
votes
Meant for switching is ContentControl but it has nothing to do with MVVM Light. Based on its Content you can assign diffrent Views. Take a look here.