Jan 27, 2014 at 7:20 PM
Edited Jan 27, 2014 at 7:26 PM
I have a module that is a user control of a data grid. I want this data grid to be able to take any view model that implements IFreq_BO. The grid will then display the right columns depending on what view model was passed in.
My ViewModel for the module:
class FrequencyEditVM : ViewModelBase
public FrequencyEditVM(ViewModelBase baseinterface, IFrequency_BO bointerface)
I have 5 menu options, all of which will open this window with this user control data grid. But what I want is to make it so each menu option will pass a different view model to the constructor of this VM. I want to only write the code once for the control
of course. How would I go about doing this with prism?
So I guess the core issue is: Depending on which menu option the user selects, how do I CONDITIONALLY inject one of 5 view models?