public override void OnApplyTemplate() { base.OnApplyTemplate(); this.alertPanel = (Panel)this.GetTemplateChild("AlertPanel"); }