Provide native support in the IDE for MVVM
Something like where VS has a "code mode" for code behind or MVVM or other pattern.
If MVVM is selected then the IDE helps us fall into the pit of MVVM success.
Even better would be a coding mode provider model, so other patterns could be plugged in over time
Lars Pedersen commented
Binding the View to the ViewModel is currently too hard for the developer.
There should be a user-friendly way to bind the View elements to the VM. Something like a tree browser that allows you to pick the property in the VM or View and assign a converter which then generates the markup for you.
Also, there needs to be window that shows binding errors in a user friendly way, with options to fix them (like what IntelliSense does for library references).
Ro We commented
Vs should have mvvm for all wpf, uwp, xamarin.
Mvvm including all sub-Patterns.
So, also small apps would have a unified design.
Do you think that code-snippets and custom item templates distributed trough nuget would solve your case? They would be active only in projects that references the nuget packages.
For example, when you install Prism.MVVM you would get item templates like Page with ViewModel and code snippets like propnotify, etc, etc.
Additionally, you may introduce snippets and templates highly specific for your project, since basic page or user control will probably look differently for each project.
If you want to navigate from View to ViewModel, just press F12 (go to definition), in the d:DataContext declaration.
Vote for the idea here if you like it: https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/17776780-code-snippets-and-item-templates-distributable-tro
Julien N commented
This would be useful !
yes i think so
"XAML Power tools" seems more interesting that automatic code behind IDE
at least integrate this tool with the IDE
Yes, the basic Models and Views should be automatically code generated by VIsual Studio. It's unnecessary grunt work and if it's automatically there, people will lean towards using it. Perhaps Visual Studio should also have templates for patterns as well.
Greg Duncan commented
Allow us to pick a pattern of choice, and then have the IDE help us fall into the pit of success by supporting that pattern. So something like replacing the current code behind model with a plug-in'able/replaceable model, with MVVM being just one such model. If "code behind" is bad, then let the IDE help us by implementing a given pattern and not force use to jump through hoops to implement them. WPF/Silverlight/xaml's awesome databinding is the first step, now let's improve that by making the IDE "understand" a pattern of choice, like MVVM