Apr 27, 2011 at 9:55 AM
Edited Apr 27, 2011 at 9:56 AM
I'm new to Prism and I'm building a sample application using Silverlight4, Prism 4 with MEF.
In the Shell have a TabControl defined as a region where I load my Main Content. Since it's a Tab control I want to load multiple views in it and be able to navigate between them.
I have a View that Lists the "Customers" from my database. By selecting one Customer and click the Details button, I navigate to the "Edit Customer Details" View that opens in a new tab.
So far, so good.
The problem is when I try to Edit 2 Customers: I choose the customer, Edit, and a new tab is created. I choose another Customer, Edit and nothing happens.
In the CustomersList ViewModel I have the following code:
UriQuery uriQuery = new UriQuery();
var _customer = customersList.CurrentItem as Customer;
if (_customer != null)
Uri EditCustomerViewUri = new Uri(EditCustomerViewName + uriQuery.ToString(), UriKind.Relative);
I saw some solutions but it involved that the ViewModel inserted directly the View into the region, but I saw somewhere that the ViewModel should be "View Independent".
Anyone knows how can I load multiple instances of the same View from the ViewModel?
Thanks in advance.