title: OnApplyTemplate not called in Custom Control
body: <p>I have a Custom Control which uses some PART controls:</p>
  
  <pre><code> [TemplatePart(Name = "PART_TitleTextBox", Type = typeof(TextBox))]
      [TemplatePart(Name = "PART_TitleIndexText", Type = typeof(Label))]
      [TemplatePart(Name = "PART_TimeCodeInText", Type = typeof(TextBlock))]
      [TemplatePart(Name = "PART_TimeCodeOutText", Type = typeof(TextBlock))]
      [TemplatePart(Name = "PART_ApprovedImage", Type = typeof(Image))]
      [TemplatePart(Name = "PART_CommentsImage", Type = typeof(Image))]
      [TemplatePart(Name = "PART_BookmarkedImage", Type = typeof(Image))]
      public class TitleBoxNew : Control
      {
          static TitleBoxNew()
          { 
              DefaultStyleKeyProperty.OverrideMetadata(
                  typeof(TitleBoxNew),
                  new FrameworkPropertyMetadata(typeof(TitleBoxNew)));
          } 
  
          public TitleBoxNew() { }
  
          // ... rest of class
      }
  </code></pre>
  
  <p>This control is overriding OnApplyTemplate:</p>
  
  <pre><code>public override void OnApplyTemplate()
  {
        base.OnApplyTemplate();
  
        InitializeEvents();
  }
  </code></pre>
  
  <p>Which works well, most of the time. I have added the control inside a custom tab control in a window and somehow OnApplyTemplate is never called for that control! Why doesn't this work as I expect?</p>