Nov 2, 2010 at 7:59 PM
Edited Nov 2, 2010 at 9:28 PM
I am glad that you found a solution for your scenario with Regions. Regarding to your second thread, in your second approach you are using View Injection instead of View Discovery, and you do not use the Dependency Injection Container (MEF) to create an
instance of your view. This is why, you are not receiving an error.
If your scenario requires to use View Discovery, you have to two options to get this working:
You have to decorate your view class with the Export attribute (pseudo-code):
public class EquipmentsView
Then you have to register the EquipmentsView in your MasterDataEditRegion using the following code (pseudo-code):
You could decorate your view class using the ViewExport attribute. This attribute allows you to indicate the region where this view will be registered. This way, you save a code line for registering your view in the region and also provides your a more MEFEE
code. So, you could use the following code (pseudo-code):
[ViewExport(RegionName = "MasterDataEditRegion")]
public class EquipmentView
If you need more guidance on this topic you could take a look at the Stock Trader Reference Implementation Application.
Hope this helps.