title: Why can't I use a DataTrigger to set TextBox.IsEnabled = True?
body: <p>In my application, I have a TextBox that I want to enable/disable based on an enum in my datacontext. The enum has three values (Anyone, Me, Someone) and I want to enable the Textbox when the value "Someone" is set. I am able to hack a solution by setting the value in reverse (see below). However, can someone please explain why the first solution didn't work?</p>
  
  <p>This does not work...</p>
  
  <pre><code>&lt;TextBox Text="{Binding ModifiedUser, UpdateSourceTrigger=PropertyChanged}"
           IsEnabled="False"&gt;
      &lt;TextBox.Style&gt;
          &lt;Style TargetType="{x:Type TextBox}"&gt;
              &lt;Style.Triggers&gt;
                  &lt;DataTrigger Binding="{Binding ModifiedBy}"
                               Value="Someone"&gt;
                      &lt;Setter Property="IsEnabled"
                              Value="True" /&gt;
                  &lt;/DataTrigger&gt;
              &lt;/Style.Triggers&gt;
          &lt;/Style&gt;
      &lt;/TextBox.Style&gt;
  &lt;/TextBox&gt;
  </code></pre>
  
  <p>Strangely, this code <strong>does</strong> work.</p>
  
  <pre><code>&lt;TextBox Text="{Binding ModifiedUser, UpdateSourceTrigger=PropertyChanged}"&gt;
      &lt;TextBox.Style&gt;
          &lt;Style TargetType="{x:Type TextBox}"&gt;
              &lt;Style.Triggers&gt;
                  &lt;DataTrigger Binding="{Binding ModifiedBy}"
                               Value="Anyone"&gt;
                      &lt;Setter Property="IsEnabled"
                              Value="False" /&gt;
                  &lt;/DataTrigger&gt;
                  &lt;DataTrigger Binding="{Binding ModifiedBy}"
                               Value="Me"&gt;
                      &lt;Setter Property="IsEnabled"
                              Value="False" /&gt;
                  &lt;/DataTrigger&gt;
              &lt;/Style.Triggers&gt;
          &lt;/Style&gt;
      &lt;/TextBox.Style&gt;
  &lt;/TextBox&gt;
  </code></pre>