I’m using the Silverlight Navigation Framework and have recently been coding my appliation in the following general way:
Public MasterPageView: UserControl
{
private IMasterPageViewModel _ViewModel = null;
public MasterPageView():this(new MasterPageViewModel(), new BusinessObjectProvider())
{
}
public MasterPage(IMasterPageViewModel viewModel)
{
InitializeComponent();
_ViewModel = viewModel;
this.DataContext = viewModel;
}
}
Now that i have the skeleton of my project created, i want to carry out some tidying up, before the heavy development starts. As part of my refactoring process i want to make use of the Unity IOC and take out my Default constructors.
Has anybody used the Silverlight Navigation Framework with Unity? I would appreciate any suggestions on how to go about this.
The Main Problems and questions i see are
1) Where do i register the Objects in the Unity Framework?
2) All Views are created using the URIMAPPER in the Silverlight Navigation Framework, how do we get the URIMAPPER to use Unity to create its Views.
Any help would be greatly appreciated.
http://www.davidpoll.com/2009/11/30/opening-up-silverlight-4-navigation-introduction-to-inavigationcontentloader/