title: How to acess text box in GridViewColumnHeader template
body: <p>I want to create a custom <code>gridview</code> with <code>header and filter</code> in each column's header. I successfully created a GridViewColumnHeader template in WPF as below:</p>
  
  <pre><code>&lt;Style TargetType="{x:Type GridViewColumnHeader}"&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="{x:Type GridViewColumnHeader}"&gt;
                      &lt;Border BorderThickness="0,0,0,1" BorderBrush="Black" Background="Transparent"&gt;
                          &lt;StackPanel Orientation="Vertical" Margin="1"&gt;
                              &lt;TextBlock Padding="5,5,5,0" Text="{TemplateBinding Content}" Width="{TemplateBinding Width}" TextAlignment="Center" /&gt;
                              &lt;TextBox x:Name="HeaderSearch" Padding="5,5,5,0" Width="{TemplateBinding Width}" TextAlignment="Center" /&gt;
                          &lt;/StackPanel&gt;
                      &lt;/Border&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
          &lt;Setter Property="OverridesDefaultStyle" Value="True" /&gt;
          &lt;Setter Property="Foreground" Value="Black" /&gt;
      &lt;/Style&gt;
  
  &lt;ScrollViewer Grid.Column="1"&gt;
          &lt;ListView&gt;
              &lt;ListView.View&gt;
                  &lt;GridView &gt;
                      &lt;GridViewColumn Header="Code" Width="100"/&gt;
                      &lt;GridViewColumn Header="Name" Width="100"/&gt;
                      &lt;GridViewColumn Header="Description" Width="100"/&gt;
                  &lt;/GridView&gt;
              &lt;/ListView.View&gt;
          &lt;/ListView&gt;
      &lt;/ScrollViewer&gt;
  </code></pre>
  
  <p>How can I access the text-box in code behind? </p>
  
  <p>Thanks in advance.</p>