title: How to get selected item in ListView to TextBox?
body: <p>How to get selected item in ListView to TextBox?</p>
  
  <pre><code>private void txtautosgn_TextChanged(object sender, TextChangedEventArgs e)
  {
      if (txtautosgn.Text.Length &gt; 1)
      {
          var names = (from autonames in lstDetails
                       where autonames.name.Contains(txtautosgn.Text.Trim())
                       select autonames.name).ToList();
  
          if (names.Count &gt; 1)
          {
              lstnames.Items.Clear();
              lstnames.Visibility = Visibility.Visible;
              foreach (string name in names)
              {
                  lstnames.Items.Add(name);
              }
              lstnames.SelectedIndex = 0;
  
          }
          else
          {
              lstnames.Visibility = Visibility.Collapsed;
          }
      }
  }
  </code></pre>