title: Disabling my TabItem during runtime?
body: <p>I have the following xaml code;</p>
  
  <pre><code>&lt;TabControl Grid.Colum="2" prism:RegionManager.RegionName="MainRegion"&gt;
      &lt;TabControl.ItemContainerStyle&gt;
          &lt;Style TargetType="TabItem"&gt;
              &lt;Setter Property="Header" Value="{Binding Title}"/&gt;
              &lt;Setter Property="IsEnabled" Value="{Binding IsEnabled}"/&gt;
          &lt;/Style&gt;
      &lt;/TabControl.ItemContainerStyle&gt;
  &lt;/TabControl&gt;
  </code></pre>
  
  <p>In my CodeBegind file (.xalm.cs) I have my viewmodel bound as datacontext (working with MVVM) and I have the title set like this;</p>
  
  <pre><code>public string title { get { return "MyTabName"; } }
  </code></pre>
  
  <p>In my viewmodel I have the following property set up;</p>
  
  <pre><code>private bool isEnabled
  
  public bool IsEnabled
  {
      get { return this.isEnabled; }
      set
      {
          this.isEnabled = value;
          this.RaisePropertyChanged();
      }
  }
  </code></pre>
  
  <p><strong>Problem:</strong> The problem is the binding not working. I do know the binding is set-up properly, because I have a button on the same page on the same binding; <code>IsEnabled="{Binding IsEnabled}"</code>, so I suppose my problem has to do with the <code>&lt;Setter/&gt;</code> only being called once upon generating the view, but because the TabControl has an x amount of tabs, depending on how much views are loaded from the prism:RegionManager, it has to be dynamic and can't be set to individual <code>TabItem</code>s.</p>
  
  <p><strong>Question:</strong> My concrete question here is, <strong>How do I set the <code>IsEnabled</code> property for all the <code>TabItem</code>s with the abovementioned binding?</strong></p>
  
  <p><strong>In Addition:</strong> I have tried </p>
  
  <pre><code>&lt;Setter Property="IsEnabled" Value="False"/&gt;
  </code></pre>
  
  <p>Which did indeed disables the <code>TabItem</code>s, which is why I'm convinced the <code>&lt;Setter/&gt;</code> is only called upon first-time generating the view and the problem is not with the binding.</p>