I’m having multiple views in my project and want them to derive from a base class where some navigation logic is handled. This logic doesn’t belong in the VM, so I’ve got it placed in the View.
Now when I’m trying to change the base class of the view I’m receiving the following error:
Partial declarations of
‘ProjectName.Results’ must not specify
different base classes.
The only thing I’ve changed is:
public partial class Results : PhoneApplicationPage
to:
public partial class Results : BaseView
I can’t find any other decleration of the Results class in my project. Perhaps MVVMLight generates something while building.
Is it possible to let the views derive from a base class? It should be, but I can’t get it to work.
Assuming that your
BaseViewinheritsPhoneApplicationPagelike following:After changing from:
To:
Also change your
XAMLfrom something like:To:
also add a xml namespace like following: