title: How can I add watermark text to a textbox in wpf?
body: <p>Im working on a wpf application.How I can add watermark text to the <code>textbox</code> and <code>passwordbox</code>?</p>
  
  <pre><code>&lt;Window x:Class="WpfApplication1.MainWindow"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     Title="Platforma Smart School 1.0" Height="580" Width="880" 
     Icon="/WpfApplication4;component/Images/capturennnnnn12_256px%20%282%291.ico"&gt;
  
  &lt;Grid&gt;
  
      &lt;Grid.Background&gt;
         &lt;ImageBrush ImageSource="/WpfApplication1;component/Images/
         hp-colorful-books-hd-105609.jpg" /&gt;
      &lt;/Grid.Background&gt;
  
      &lt;Rectangle Height="334" HorizontalAlignment="Left" Margin="608,162,0,0" 
      Name="rectangle1" Stroke="#FFDBD8D8" VerticalAlignment="Top" Width="222"
      Fill="#FFF0F0F0" /&gt;
  
      &lt;Button Height="34" HorizontalAlignment="Left" Margin="630,434,0,0"
      Name="button1" VerticalAlignment="Top" Width="178" FontSize="13" 
      Foreground="#FF555555" /&gt;
  
      &lt;TextBox Height="34" HorizontalAlignment="Left" Margin="630,219,0,0" 
      Name="textBox1" VerticalAlignment="Top" Width="178" FontSize="14" Text=""
      Foreground="#FF7C7A7A"  /&gt;
  
      &lt;PasswordBox Height="32" HorizontalAlignment="Left" Margin="630,304,0,0"
      Name="passwordBox1" VerticalAlignment="Top" Width="178" FontSize="14"
      FontFamily="Segoe UI"/&gt;
  
      &lt;Image Height="134" HorizontalAlignment="Left" Margin="606,12,0,0" 
      Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="224"
      Source="/WpfApplication1;component/Images/Capture3.PNG" /&gt;
  
      &lt;Label Content=" Smart School" Height="31" HorizontalAlignment="Left" 
      Margin="251,498,0,0" Name="label1" VerticalAlignment="Top" Width="227" /&gt;
  
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>