I'm coming across from WinForms and need to understand how best to implement this requirement: [Pseudo]-Visual Form Inheritance in WPF.
In my WinForms app (which I am sloooowly reengineering in WPF), I have lots of 'base' forms that set up certain requirements and generic functionality (such as ListFormBase, which has a data grid and several buttons. This base sets up lots of standard behaviours
(CRUD, search, print, print preview, etc). The constructor accepts a generic parameter, which I use to pass in one of my business objects.
In descendant forms, I simply add functionality that is specific/quirky to the individual business object (such as Product havingthe ability to search back orders, customer having the ability to pull up list of previous orders, etc.) All the standard behaviour
comes down to the descendants automatically and new buttons/features are easy to add. This set up works an absolute treat - it's very simple, very effective.
I need to start to understand how to achieve the same in WPF. How do you create Pages in XAML that descend from base versions? How do I also link up the code behind in an OO manner, so that all the behaviour from the base comes down in the descendants?
Any help would be much appreciated.
View Complete Post