I have started using Stylet for MVVM in WPF. I have my Views in the namespace StyletProj.Pages
with the Bootstrapper
in the namespace StyletProj
, and my ViewModels in the namespace StyletViewModels.ViewModels
(in another assembly). I need to have the Views and ViewModels linked. How can I do this? This is what I have so far in my bootstrapper.
namespace StyletProj
{
public class Bootstrapper : Bootstrapper<ShellViewModel>
{
protected override void ConfigureIoC(IStyletIoCBuilder builder)
{
// Configure the IoC container in here
}
protected override void Configure()
{
// Perform any other configuration before the application starts
var viewManage = this.Container.Get<ViewManager>();
viewManage.NamespaceTransformations
}
}
}
What do I do with NamespaceTransformations
? Is this the wrong way? I also found this example (and wiki page), but they suggest to create a whole new ViewManager
to do this, which seems a tad bit overkill. How do I go about this in the simplest way possible (I'd rather not create a new ViewManager
? I don't even understand what they are doing in the example.