title: Bind IsEnabled property to Boolean in WPF
body: <p>I have a <code>TextBox</code> which needs to be enabled / disabled programmatically. I want to achieve this using a binding to a <code>Boolean</code>. Here is the <code>TextBox</code> XAML:</p>
  
  <pre><code>&lt;TextBox Height="424" HorizontalAlignment="Left" 
                   Margin="179,57,0,0" Name="textBox2" 
                   VerticalAlignment="Top" Width="777"
                   TextWrapping="WrapWithOverflow" 
                   ScrollViewer.CanContentScroll="True" 
                   ScrollViewer.VerticalScrollBarVisibility="Auto" 
                   AcceptsReturn="True" AcceptsTab="True" 
                   Text="{Binding Path=Text, UpdateSourceTrigger=PropertyChanged}"
                   IsEnabled="{Binding Path=TextBoxEnabled}"/&gt;
  </code></pre>
  
  <p>Notice the Text property is bound as well; it is fully functional, which makes me think it is not a DataContext issue.</p>
  
  <p>However, when I call this code:</p>
  
  <pre><code>private Boolean _textbox_enabled;
  public Boolean Textbox_Enabled
  {
      get { return _textbox_enabled; }
      set
      {
          OnPropertyChanged("TextBoxEnabled");
      }
  }
  </code></pre>
  
  <p>It does not work. To give further information, the TextBox_Enabled property is changed by this method:</p>
  
  <pre><code>public void DisabledTextBox()
  {
       this.Textbox_Enabled = false;
  }
  </code></pre>
  
  <p>..which is called when a key combination is pressed.</p>