title: Binding TexBox Name to TextBlock Name, Placeholder
body: <p>Short background on the problem: I am trying to make a readable, xaml only TextBox Placeholder, which is packed to a ResourceDictionary.</p>
  
  <p>At this point - I have made a well working prototype, which looks and used on the page like this:</p>
  
  <pre><code>&lt;Grid&gt;
          &lt;TextBox   Style="{StaticResource SearchBox}"                               
                      Width="325"                         
                      x:Name="UsarioDisponiblesSearch"/&gt;
          &lt;TextBlock IsHitTestVisible="False"
                          Text="Search..." 
                          VerticalAlignment="Center"
                          HorizontalAlignment="Left"
                          Margin="5,0,0,0"
                          Foreground="{StaticResource WhiteFadedBrush}"&gt;
              &lt;TextBlock.Style&gt;
                  &lt;Style TargetType="{x:Type TextBlock}"&gt;
                      &lt;Setter Property="Visibility" Value="Collapsed"/&gt;
                      &lt;Style.Triggers&gt;
                          &lt;DataTrigger Binding="{Binding Text, ElementName=UsarioDisponiblesSearch}" Value=""&gt;
                              &lt;Setter Property="Visibility" Value="Visible"/&gt;
                          &lt;/DataTrigger&gt;
                      &lt;/Style.Triggers&gt;
                  &lt;/Style&gt;
              &lt;/TextBlock.Style&gt;
          &lt;/TextBlock&gt;            
          &lt;Image Source="/img/search.png" Height="15" HorizontalAlignment="Right" Margin="0,0,5,0" /&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Grid, that holds the SearchBox consist of 3 elements:</p>
  
  <ol>
  <li>TextBox - which will receive search string;</li>
  <li>TextBlock - which actually holds the PlaceHolder. It disapears, as soon as ElementName of TextBox is not an empty string;</li>
  <li>Image - custom icon on the right from the SearchBox.</li>
  </ol>
  
  <p>What I want to achieve is a look like this on the page:</p>
  
  <pre><code>       &lt;Grid&gt;
              &lt;TextBox   Style="{StaticResource SearchBox}"                               
                          Width="325"                         
                          x:Name="UarioDisponiblesSearch"/&gt;
              &lt;TextBlock Style="{StaticResource PlaceHolder}"
                         x:Name="{Binding Text, ElementName=UarioDisponiblesSearch}" /&gt;
          &lt;/Grid&gt;
  </code></pre>
  
  <p>And like around this styles, described in the ResourceDictionary:</p>
  
  <pre><code>&lt;Style x:Key="SearchBox" TargetType="{x:Type TextBox}"&gt;
      &lt;Setter Property="Background" Value="Transparent" /&gt;
      &lt;Setter Property="BorderThickness" Value="0" /&gt;
      &lt;Setter Property="VerticalAlignment" Value="Center" /&gt;
      &lt;Setter Property="HorizontalAlignment" Value="Left" /&gt;
      &lt;Setter Property="Margin" Value="5,0,0,0" /&gt;
      &lt;Setter Property="Foreground" Value="{StaticResource WhiteBrush}" /&gt;        
  &lt;/Style&gt;
  &lt;Style x:Key="Placeholder" TargetType="{x:Type TextBlock}"&gt;
      &lt;Setter Property="IsHitTestVisible" Value="False" /&gt;
      &lt;Setter Property="Text" Value="Search..." /&gt;
      &lt;Setter Property="VerticalAlignment" Value="Center" /&gt;
      &lt;Setter Property="HorizontalAlignment" Value="Center" /&gt;
      &lt;Setter Property="Margin" Value="5,0,0,0" /&gt;
      &lt;Setter Property="Foreground" Value="{StaticResource WhiteFadedBrush}" /&gt;
      &lt;Setter Property="Visibility" Value="Collapsed"/&gt;
      &lt;Style.Triggers&gt;
          &lt;DataTrigger Binding="{Binding Text, RelativeSource={RelativeSource Self}}" Value=""&gt;
              &lt;Setter Property="Visibility" Value="Visible"/&gt;
          &lt;/DataTrigger&gt;
      &lt;/Style.Triggers&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>The main obstacle on my way there is the Binding, because I am not really good still in understanding how does it work, and the fact, that at this point three elements will have to share the same Name property (Which I suppose is a pretty huge obstacle as well).</p>
  
  <p>I am not sticking to exactly this construction but I want it to be reusable, useful for the community and neat looking.</p>