tags:

views:

47

answers:

1

Maybe this has been asked before, but I can't seem to find the answer through searching and googling it. What I need is a way to tell when a template of a control has changed. Meaning I'm looking for an event to fire when a template has changed on a control. Something along the lines of an event called TemplateChanged. I don't see any objects in the object hierarchy that have this event. Am I missing something here? There must be a way to get notification of a template being changed on control. Thanks in advance.

+1  A: 

Have you tried overriding the OnApplyTemplate() method?

Jeremiah Morrill
For my situation I don't think this will work. For example, I want to set focus on a particular element based on when a control's template has changed. So I need some event to subscribe to. If I am correct this method lets your control know internal to itself that the template has changed. I need to know external to control when its template has changed.
prem_data
Anyone else have any ideas?
prem_data