I am developing my first WPF application and I am having trouble with binding and navigation. What I want to do is to create a UI in which there are a right and top panel which are used to navigate between the frame and the remaining space in the window is used to display the different frames. I think that the best practice would be to use different viewmodels each one associated to a different xaml and bind the viewmodels to the area in which I want the content to be displayed. Anyway my questions are: 1) Which UI component should I use to display the changing content in the main Window? A Page? A UserControl? 2) How can I make the binding? 3) Is there some guide or article that is not msdn that you suggest me to read?
Asked
Active
Viewed 848 times
0
-
Here is allready answered how to make a simple navigation, i think it can set you on right track. [simple navigation in wpf](https://stackoverflow.com/questions/42709379/how-to-display-user-control-within-the-main-window-in-wpf-using-mvvm/42714915#42714915) – ivica.moke May 24 '17 at 07:57
1 Answers
0
The way that I do to handle communication and navigation between Views and ViewModels is that I have a Base-ViewModel that all my other ViewModels inherit and a "Shell-View" that displays my Main-Window.
Then I just use whatever Base-ViewModel that comes in into my Shell-View datacontext.
I use UserControl
for and then put it into ContentControl
s.
Here is a good tutorial for MVVM Navigation
I highly suggest that you go through this blog, cause it explains really well on how MVVM CAN be used.

Bojje
- 419
- 7
- 24