I'm on the design phase of a WPF desktop application. It has a MainWindow with its WindowState as Maximized and also a Menubar. I want the Mainwindow to display a set of controls when the user selects each menu item, rather than opening another window. Is this possible?
Using the MVP(model view presenter)pattern will achieve this for you.
You best starting point is to do the exercises in Sams-Teach-Yourself-WPF-Hours[^] - i.e read the book and follow the exercises as the book progresses.
Your question hints that you are fairly new to WPF - WPF being something that you cannot generally pick up by playing around with it like winforms I suggest you get started on your reading and good luck
“That which can be asserted without evidence, can be dismissed without evidence.”
It sounds like what you want to do is to have a set of user controls, each of which is loaded depending on a menu option selection.
the Simplest (but probably least efficient depending on memory footprint, number of menu options etc.) is simply to place all of the user controls on teh window, then make them invisible until a menu option is selected.
You could also load the user controls dynamically when a menu option is selected. (see here[^] for one of many examples of how to do that.
Where do you set the value of the MyViewModelList?
The bindings that you showed were reading from the MyViewModelList.
The XAML binding will not create the list for you.
Also to note: adding to, or removing from the MyViewModelList will not cause the RaisePropertyChanged to be raised. As you have this coded, that is raised only when the MyViewModelList property is assigned to (replaced).
You don't. That's not what you use a ViewModel for. What you would normally do is create a command in your ViewModel and then hook it up to an event in your XAML using something like Laurent Bugnion's EventToCommand[^].
If you don't want to complicate things you can always just respond to the MouseDown event in your view's code behind. Here you have access to your ViewModel (via the DataContext) so can 'tell' your ViewModel to perform some action (whether via a command or a property or method - whatever works for you)