You may want to check out this video on DotNetRocks TV
It's a WPF Line of Business teach-me kind of thing...
http://perseus.franklins.net/dnrtvplayer/player.aspx?ShowNum=0115 I don't know if it covers subclassing or not, but I bet you will learn some helpfule things.
>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 ?