title: Data trigger not firing off correct string value
body: <p>So here's the idea.
  If the textbox is empty, 'DataTrigger' should set the outline (BorderBrush) to red.
  If the textbox is not empty / has text; then the dataTrigger should set the BorderBrush to Blue.</p>
  
  <pre><code>xmlns:conv="clr-namespace:WpfApplication1"
      Title="MainWindow" Height="350" Width="525"&gt;
  &lt;Window.Resources&gt;
      &lt;!-- conv is referenced in the "clr-namespace:WpfApplication1" namespace. It's bassically a referal to a converter I'm using --&gt;
      &lt;conv:IsNullConverter x:Key="isNullConverter"/&gt;
      &lt;Style TargetType="{x:Type TextBox}"&gt;
          &lt;Style.Triggers&gt;
              &lt;!-- if the textbox is empty, then the setter should set the border colour to red--&gt;
              &lt;DataTrigger Binding="{Binding Words, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource isNullConverter}}" Value="True"&gt;
                  &lt;Setter Property="BorderBrush" Value="Red"/&gt;
              &lt;/DataTrigger&gt;
              &lt;!-- If it has text inside it, setter should set the border colour to blue --&gt;
              &lt;DataTrigger Binding="{Binding Words, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource isNullConverter}}" Value="False"&gt;
                  &lt;Setter Property="BorderBrush" Value="Blue"/&gt;
              &lt;/DataTrigger&gt;
          &lt;/Style.Triggers&gt;
      &lt;/Style&gt;
  &lt;/Window.Resources&gt;
  
  &lt;Grid&gt;
      &lt;TextBox x:Name="first" FontSize="14" TabIndex="1" Background="Black" BorderThickness="5" Foreground="White" Margin="29,10,132,272" /&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Because it's not possible for datatriggers to see if a value is NOT null indipendently, I had to add some code to help it do that.</p>
  
  <pre><code>using System.Windows.Data;
  using System.Globalization;
  using System.ComponentModel;
  
  namespace WpfApplication1
  {
  
  
  public class IsNullConverter : IValueConverter, INotifyPropertyChanged
  {
      // The string that the 'conv:' checks against
      private string FOO;
  
      // The DataTriggrer is bound to 'Words'
      public string Words
      {
          get
          {
              return FOO;
          }
  
          set
          {
              if (FOO != value)
              {
                  FOO = value;
                  RaisePropertyChanged("Words");
              }
          }
      }
  
      private void RaisePropertyChanged(string prop)
      {
          if (PropertyChanged == null)
          {
              PropertyChanged(this, new PropertyChangedEventArgs(prop));
          }
      }
      public event PropertyChangedEventHandler PropertyChanged;
  
      public string Error
      {
          get { return null; }
      }
  
      // This is the 'Convert' Parameter conv checks against. Here is the problem is
      public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
      {
          //This checks against the FOO string at the top of this class. Not the FOO in 'Words' get &amp; set string
          if (FOO == null)
          {
              value = true;
          }
  
          // So even if 'Words' raises the property changed, The origional FOO string remains unaffected.
          // So the Datatrigger is never fired
          if (FOO != null)
          {
              value = false;
          }
          return value;
      }
  
      public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
      {
          throw new InvalidOperationException("IsNullConverter can only be used OneWay.");
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>The thing is if I append the string FOO like;</p>
  
  <pre><code>private string FOO = "Something";
  </code></pre>
  
  <p>The Datatrigger fires at runtime and changes the outline colour to blue.
  But I need the colour to be based on the textbox content rather than what I directly declare the string as.</p>
  
  <p>I tried binding the data Trigger to the 'Words' string but the outline colour remains red, empty or not.</p>
  
  <p>And suggestions? I really don't mind if I have to completely throw this code upside down if there's a better way of doing it.</p>