title: Usage of TextSearch.Text in DataTemplate
body: <p>I have a very simple example: WPF form application with single form which contains a dictionary with data:</p>
  
  <pre><code>Dim dict As New Collections.Generic.Dictionary(Of String, String)
  
  Private Sub MainWindow_Loaded() Handles Me.Loaded
      dict.Add("One", "1")
      dict.Add("Two", "2")
      dict.Add("Three", "3")
  
      lst1.ItemsSource = dict
  End Sub
  </code></pre>
  
  <p>On form I have a ListBox (named "lst1"), which uses "dict" as items source:</p>
  
  <pre><code>&lt;ListBox x:Name="lst1"&gt;
      &lt;ListBox.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;Label Content="{Binding Value}" 
                     TextSearch.Text="{Binding Path=Key, Mode=OneWay}" /&gt;
          &lt;/DataTemplate&gt;
      &lt;/ListBox.ItemTemplate&gt;
  &lt;/ListBox&gt;
  </code></pre>
  
  <p>Also I have one non-bound ListBox, prefilled with values manually:</p>
  
  <pre><code>&lt;ListBox&gt;
      &lt;Label TextSearch.Text="One" Content="1" /&gt;
      &lt;Label TextSearch.Text="Two" Content="2" /&gt;
      &lt;Label TextSearch.Text="Three" Content="3" /&gt;
  &lt;/ListBox&gt;
  </code></pre>
  
  <p>So when I launch app, it looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/y1XiZ.jpg" alt="Application&#39;s window"></p>
  
  <h2>THE QUESTION:</h2>
  
  <p>If I try to navigate items with keyboard by typing "one", "two" or "three", I succeed only in non-bound list box. Bound list box fails.</p>
  
  <p>Some remarks:
  1.) If I press "[" while in bound list box, focus changes from item to item in cyclic manner: it goes from 1 to 2, from 2 to 3, from 3 to 1, from 1 again to 2 etc.
  2.) I have checked app with Snoop. One difference I found between bound and non-bound list boxes. Both list boxes have TextSearch.Text property set on Label controls (inside ItemsPresenter). But for non-bound case: "value source" of TextSearch.Text property is "Local". For bound case: "value source" is "ParentTemplate".</p>
  
  <p><strong>P.S. (and N.B.)</strong>
  I know that I can use TextSearch.TextPath on the list box, but this is not what I need :)
  Also, setting TextSearch.Text property for ListViewItem (by using Style) does not help.</p>