title: WPF Binding Object to Textbox and use DataTemplate
body: <p>Hallo I have some problems with my new WPF-Project.
  I have a ListView with different Objects. When the user selects an object the "details" also the properties of this object are in the Textbox beside the listview. </p>
  
  <p>Select object --> object goes to textbox --> textbox present object with a Data Template</p>
  
  <p>In my test Project I fixed it with a second listview. </p>
  
  <pre><code>private void listView_SelectionChanged(object sender, SelectionChangedEventArgs e)
  {
      if(listView.SelectedItem is Entity)
      {
          listView1.Items.Clear();
          listView1.Items.Add(listView.SelectedItem);
      }
  }
  </code></pre>
  
  <p>Data Template for the textbox, in this example i used it for the second listView</p>
  
  <pre><code>&lt;DataTemplate  DataType="{x:Type local:Entity}"&gt;
     &lt;TextBox Text="{Binding A1}" /&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/SqQah.png" rel="nofollow noreferrer">A Screenshot from my test project</a></p>
  
  <p>I want to solve the problem like in this screenshot, but without a listview because i need to copy the properties and the focus from the listview ist annoying</p>
  
  <p>Anybody knows a solution?</p>
  
  <p>Greetings</p>