xpaulbettsx/ReactiveUI — pull request #72 by lunaryorn (2012-07-11 10:27:59+00:00)
Title: Access template elements after template is applied

Template items cannot safely be accessed in Loaded event handlers,
because Loaded events might occur *before* the template is actually
applied, i.e. a "Loaded" -> "OnApplyTemplate()" -> "Loaded" chain. In
such a case access to template elements will fail during the first
Loaded event, though it will succeed during the second event after the
template is loaded. To deal correctly with such cases, move access to
template elements to a place where the template is definitely loaded,
i.e. OnApplyTemplate().