When writing a wpf prism app, I use the ViewModelLocator
to automatically create the datacontext when needed. While this works great, there's no intellisense help unless I add a designtime datacontext (d:DataContext="{d:DesignInstance viewModels:MyViewModel}"
), but that somewhat defeats the purpose of automatically discovering and connecting the viewmodel.
I image something like this: a resharper plugin that looks for ViewModelLocator.AutowireViewModel="True"
in the xaml, fetches the class name, derives the viewmodel type and then tells intellisense to use this type as datacontext.
Question: is it possible for a resharper plugin to tell intellisense what is the type of the datacontext without the designtime datacontext?
Ancillary question: can you give a complete resharper sdk beginner a hint on how to accomplish this?