Namespace convention - little lost...

Feb 16, 2012 at 10:02 PM

Trying to match multiple views onto a single viewmodel.  Recently moved the View into the folder associated for keeping everying together...

Views
   Planes
      PlanesView.xaml
      Default.xaml
      Add.xaml
      Edit.xaml

ViewModels
   Planes
      PlanesViewModel.cs

 

When I did this didn't think about the namespace that ViewLocator would be searching for till now...

PilotSystem.Views.Planes.Planes.Default can't be located because well it doesn't exist in that namespace what do I need to put into the ViewLocator for a mapping to catch this issue.   I am using Context to set the ContentControl with the view appropriate for the operation at hand add/default(list)/edit/ etc...

Feb 16, 2012 at 11:15 PM

nvm got it figured out...

Coordinator
Feb 17, 2012 at 2:04 PM

If you don't mind, please post your solution for future users :)

Feb 17, 2012 at 2:51 PM
Edited Feb 17, 2012 at 2:52 PM

ViewLocator.AddSubNamespaceMapping("ViewModels.*", "Views");

It's actually part of the examples