New Video Tutorial: How to Use a Behavior to Fire Methods from Objects in Styles
Recently I had a developer ask me how he could fire an event from the CheckBox that I had put in the Style of the UserControl I gave him.
I thought about it and, the problem is that objects in a Style are not really part of the Visual Tree until the Style is attached at runtime.
After a lot of thought and many failures I developed a Behavior (IN CODE) that can be attached to objects in or out of Styles that allows you to specify what Method they need to fire. This Behavior uses Reflection to find and invoke the specificed method.
I made a video tutorial to show you how to do it too!