views:

12

answers:

0

I have a custom container control that has a number of dependency properties. One of which requires element binding.

Most of the controls logic is within the OnApplyTemplate() method. When I test my control inside a normal panel or ItemsControl, everything works fine. However if the control is placed inside a ContentControl (which it will be, in a Prism region) the OnApplyTenplate method is fired before the the element binding has taken place.

Has anybody else seen this kind of behaviour. I'd rather the users not see the controls rendered in the wrong state and then re-rendered when it picks up the binding.