title: wpf TabItem binding IsEnabled
body: <p>I would like to bind the <code>IsEnabled</code> property of <code>TabItem</code> to data within my code.</p>
  
  <p>e.g. I have a <code>TabItem</code> defined as follows</p>
  
  <pre><code>&lt;TabItem Name="Tab1" Header="Tab1" IsEnabled="{Binding Path=Tab1Enabled, Mode=TwoWay}"&gt;
  &lt;/TabItem&gt;
  </code></pre>
  
  <p>And I have defined a data class which inherits from <code>INotifyPropertyChanged</code> as follows</p>
  
  <pre><code>class MyData : INotifyPropertyChanged
  {
      public event PropertyChangedEventHandler PropertyChanged;
  
      private void OnPropertyChanged(string name)
      {
          if (PropertyChanged != null)
          {
              PropertyChanged(this, new PropertyChangedEventArgs(name));
          }
      } 
      public bool Tab1Enabled
      {
          get{ return m_tab1Enabled; }
          set
          {
              m_tab1Enabled = value;
              OnPropertyChanged("Tab1Enabled");
          }
      }            
  }
  </code></pre>
  
  <p>Then I set the <code>DataContext</code> to my data member.</p>
  
  <pre><code>public partial class MyApp : Window
  {
      MyData m_myData = new MyData();
      MyApp()
      {
          InitializeComponent();
          this.DataContext = m_myData;
      }
  }
  </code></pre>
  
  <p>However, when the Tab1Enabled property gets set programatically, the PropertyChanged event is null and so the notification event is not sent.</p>
  
  <p>Thanks in advance.</p>