title: WPF Style Trigger Not Working?
body: <p>Good Day,</p>
  
  <p>I have a TextBlock element with a black background and text with a black foreground color.  I do not want my users to see the text until a task is completed.  Then the text will turn into a greenish color.</p>
  
  <p>My style trigger in xaml looks like:</p>
  
  <pre><code>    &lt;Style x:Key="DataImportCompletedStyle" TargetType="{x:Type TextBlock}"&gt;
          &lt;Setter Property="Foreground" Value="#FF000000" /&gt;
          &lt;Style.Triggers&gt;
              &lt;DataTrigger Binding="{Binding IsImportCompleted}" Value="True"&gt;
                  &lt;Setter Property="Foreground" Value="#FF99F999" /&gt;
              &lt;/DataTrigger&gt;
          &lt;/Style.Triggers&gt;
      &lt;/Style&gt;
  </code></pre>
  
  <p>My TextBlock looks like:</p>
  
  <pre><code>        &lt;TextBlock x:Name="ImportStatusMesage"
                     Grid.Row="3"
                     Margin="5,0,5,10"
                     Background="Black"
                     FontSize="18"
                     Foreground="#FF000000"
                     Style="{StaticResource DataImportCompletedStyle}"
                     Text="Data Import Completed" /&gt;
  </code></pre>
  
  <p>And my code behind for the IsImportCompleted boolean property is:</p>
  
  <pre><code>    private bool isImportCompleted;
      public bool IsImportCompleted 
      { 
          get { return isImportCompleted; }
          set
          {
              isImportCompleted = value;
              System.Diagnostics.Debug.WriteLine("Import Process Completed...OnPropertyChanged");
              OnPropertyChanged("IsImportCompleted");
          }
      }
  </code></pre>
  
  <p>which does implement INotifyPropertyChanged.  The task works fine and updates the IsImportCompleted property as I am seeing my message in the Output window, but the text doesn't change color.</p>
  
  <p>I thought by using INotifyProperty that the UI would update itself.</p>
  
  <p>I'm using Snoop and verified that the IsImportCompleted is set to true.  But still no text color change.</p>
  
  <p>Any advice,</p>
  
  <p>TIA,</p>
  
  <p>coson</p>