title: How can I set hint text (cue banner) in a text box when it's empty or null, and disable if it's not empty or null?
body: <p>I'm new to xaml and not sure how databind works.  I'm trying to enable hint text when my text box is null.  But I'm not sure how the data bind work to disable it when it's not null.</p>
  
  <p>Here is a solution I found that works to get my hint text.  How do this code to work to disable it if my first name textbox has a value?</p>
  
  <pre><code>&lt;TextBox Grid.Row="1"&gt;
      &lt;TextBox.Style&gt;
          &lt;Style TargetType="TextBox" xmlns:sys="clr-namespace:System;assembly=mscorlib"&gt;
              &lt;Style.Resources&gt;
                  &lt;VisualBrush x:Key="CueBannerBrush" AlignmentX="Left" AlignmentY="Center" Stretch="None"&gt;
                      &lt;VisualBrush.Visual&gt;
                          &lt;Label Content="First Name" Foreground="LightGray" /&gt;
                      &lt;/VisualBrush.Visual&gt;
                  &lt;/VisualBrush&gt;
              &lt;/Style.Resources&gt;
              &lt;Style.Triggers&gt;
                  &lt;Trigger Property="Text" Value="{x:Static sys:String.Empty}"&gt;
                      &lt;Setter Property="Background" Value="{StaticResource CueBannerBrush}" /&gt;
                  &lt;/Trigger&gt;
                  &lt;Trigger Property="Text" Value="{x:Null}"&gt; 
                      &lt;Setter Property="Background" Value="{StaticResource CueBannerBrush}" /&gt;
                  &lt;/Trigger&gt;
                  &lt;Trigger Property="IsKeyboardFocused" Value="True"&gt;
                      &lt;Setter Property="Background" Value="White" /&gt;
                  &lt;/Trigger&gt;
              &lt;/Style.Triggers&gt;
          &lt;/Style&gt;
      &lt;/TextBox.Style&gt;
  
      &lt;TextBox.Template&gt;
          &lt;ControlTemplate&gt;
              &lt;TextBox Text="{Binding SelectedItem.FirstName,UpdateSourceTrigger=PropertyChanged}"/&gt;
          &lt;/ControlTemplate&gt;
      &lt;/TextBox.Template&gt;
  &lt;/TextBox&gt;
  </code></pre>