title: WPF. Background help text in textbox and passwordbox
body: <p>I’m writing an WPF-based application and I’ve got a problem with It. I've searched an answer for weeks, but still couldn't find the solution. The problem is: I can’t show the background text with a tip. I’m using my own written style and trying to show text via triggers. Here’s the code sample I made:</p>
  
  <pre><code>&lt;Style TargetType="{x:Type TextBox}" x:Key="DCTextBox"&gt;           
              &lt;Setter Property="OverridesDefaultStyle" Value="True"/&gt;
              &lt;Setter Property="FontSize" Value="14"/&gt;
              &lt;Setter Property="Foreground" Value="#21346b"/&gt;
              &lt;Setter Property="FontFamily" Value="Fonts/#BankGothic Md BT"/&gt;            
              &lt;Setter Property="Template"&gt;
                  &lt;Setter.Value&gt;
                      &lt;ControlTemplate TargetType="{x:Type TextBox}"&gt;
                          &lt;Border CornerRadius="5" BorderThickness="6" BorderBrush="#21346b" Background="White" &gt;
                              &lt;ScrollViewer Margin="0" x:Name="PART_ContentHost"/&gt;
                          &lt;/Border&gt;
                      &lt;/ControlTemplate&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt; 
              &lt;Style.Resources&gt;
                      &lt;VisualBrush x:Key="HelpBrush" Opacity="0.4" Stretch="None" AlignmentX="Left" &gt;
                          &lt;VisualBrush.Visual&gt;
                              &lt;TextBlock FontStyle="Italic" Text="Type or select from list" Background="Black"/&gt;
                          &lt;/VisualBrush.Visual&gt;
                      &lt;/VisualBrush&gt;
              &lt;/Style.Resources&gt;         
              &lt;Style.Triggers&gt;
                  &lt;Trigger Property="Text" Value="{x:Null}"&gt;
                      &lt;Setter Property="Control.Background" Value="{StaticResource HelpBrush}"/&gt;
                  &lt;/Trigger&gt;
                  &lt;Trigger Property="Text" Value=""&gt;
                      &lt;Setter Property="Control.Background" Value="{StaticResource HelpBrush}"/&gt;
                  &lt;/Trigger&gt;
              &lt;/Style.Triggers&gt; 
          &lt;/Style&gt;
  </code></pre>
  
  <p>Please, tell me where could be the problem? Oh, and one more question: is it possible to output the background text in passwordbox using the similar method? Thank you!</p>