title: WPF Cancelling Tab Selection causes Changing event to happen twice
body: <p>I am doing something like the following to prevent a tab selection from changing:</p>
  
  <pre><code> tabControl.Items.CurrentChanging += new CurrentChangingEventHandler(Items_CurrentChanging);
  
   void Items_CurrentChanging(object sender, CurrentChangingEventArgs e)
   {
       if( dataIsInvalid )
       {
            // Show some popup message
            var item = ((ICollectionView)sender).CurrentItem;
            e.Cancel = true;
            tabControl.SelectedItem = item; // !! This causes the CurrentChanging event to happen twice !! 
                                            // But without this the visual tree does not update! :( 
       }
  }
  </code></pre>
  
  <p>However the problem that I am seeing right now is that the last line above causes a CurrentChanging event to happen a second time, and my popup message is displayed twice. Not only that, it is displayed the second time after bringing another window into focus first, and then putting focus back on my tab control's window.
  Any ideas why this could be happening?</p>
  
  <p>--EDIT--
  It looks like I should really only need <code>e.Cancel</code> and not require updating the <code>SelectedItem</code> again. However the visual tree is not updated unless I do this. Is there any way I can ensure the visual tree of the tab control is updated after <code>e.Cancel</code> occurs, without having to update the <code>SelectedItem</code>?</p>