I want to listen for changes to the IsEnabled property on WPF elements (so that I can run some common code whenever it changes) without having to put a load of code in each window/page.
I also want to avoid any potential problems with memory leaks due to strong event listeners. I've come across some articles that suggest using weak event listeners etc. but that seems awfully complicated for something that seems like it should be really easy.
I don't want to have to subclass controls in order to do this as there are several control types (and probably more in future) that I want to listen for the IsEnabled change on.
Has anyone come up with a neater way of handling this?