NavigateAction to View Model with generic type definition possible

Feb 6, 2011 at 2:07 PM


I would like to use the NavigateAction to navigate to a view which has an associated VM that has a generic type definition, is this possible as I can't see how I can pass "T"?




public class WidgetConfigurationViewModel<T> : NavigationViewModelBase{}

Thanks in advance for any help.



Feb 7, 2011 at 11:36 PM

Without going into more complex/advanced ways of doing so, you can simply define the ViewModel on the View itself, like so:

public partial class MailWidgetConfigurationView : UserControl

or alternatively use DefineViewViewModel to achieve the same.