private void OnSwapTemplate(DelaySwitchParams data)
 {
     // If we are switching the templates fast the invokes will lag. So ignore old invokes.
     if (data.Template == _currentTemplate)
     {
         this.DoSwapTemplate(data.Template, data.BeginAnimation);
         _currentTemplate = null;
     }
 }
 private void OnSwapTemplate( DelaySwitchParams data )
 {
   // If we are switching the templates fast the invokes will lag. So ignore old invokes.
   if( data.Template == _currentTemplate )
   {
     this.DoSwapTemplate( data.Template, data.BeginAnimation );
     _currentTemplate = null;
   }
 }