views:

61

answers:

1

I want to use UserControl as the base for my views, but I cannot add functionality to my views because they are based on UserControl.

How do I create my own view class by using a subclassed version of UserControl.

A: 

You put them in the subclassed version of UserControl, and implement an interface which denotes the abilities the class has, so the ViewModel can be used with any type of View by simply using the interface.

Femaref
Are you talking about having a reference to your View from your ViewModel? Even through an interface this is one of the most hotly debated MVVM issues. Personally, I would look into implementing a Messenger Pattern like MVVMlight Messenger, so the View and ViewModel stay as losely coupled as possible.
Agies