We develop a wizard-like WPF application that has a Frame that navigates to various Pages. I define each Page in a separate xaml and xaml.cs file, and then have the application make the frame navigate between the page.
All of my pages currently inherit from Page. I would like to have a common interface to all my pages, so I can access them polymorphicly. However, changing the base class of the Page causes compilation to fail, as the files automatically generated by Visual Studio from the xaml file set the base class to Page, and I get an error that Partial declarations of must not specify different base classes.
One option I have is adding another interface (e.g. WizardPage) and make all the classes implement that interface, but that meas that each page need to implement all the intefaces functions, and this is inconvenient as I want most of the functions, for most of the pages, to have a default empty implementations.
Can you suggest other options I can use to address this?
Thasnks
splintor