Hi,
I'm about to start - well thinking of starting - the first application
I'd like to invest time in subclassing most controls.
I'm thinking of starting with subclassing the wpf form - so I can add some functionality, like restoring it to its previous position and the like
My plan is to create a blank solution and adding a 'base' project (with the subclasses) . The intention to 'include' that base project into other apps (solutions) in the future
The second project would be THE app
Question re subclassing wpf windows/page/....
Is that the best approach ? [think I can manage the templates = modify the existing ones]
Or is there something better - like adding a class (to be written) which would handle such things
That class would have to be able to 'intercept' events from the window it is on. So, like adding it as a property
public partial class WindowBase : Window
{
ClassToHandleMostOfTheThings PropertyToHandleMostOfTheThings;
public WindowBase()
:base()
{
InitializeComponent();
PropertyToHandleMostOfTheThings = new ClassToHandleMostOfTheThings(this);
}
}
Goal is to minimize the code to add on each window
Any thoughts ?
Gregory