title: How to synchronize a TextBox with a ListBox in WPF using IsSynchronizedWithCurrentItem
body: <p>I'm starting with WPF and I have this pretty easy question:</p>
  
  <p>I have a TextBlock and a Listbox that share the same DataContext. The ItemsSource of the ListBox is set to point to a property of the DataContext that its an ObservableCollection. I want that the TextBlock to contain the selected item of the Listbox. Some code:</p>
  
  <pre><code>View view = new View();
  view.DataContext = new ViewModel();
  view.Show();
  </code></pre>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>&lt;TextBlock Name="textBox1" Grid.Row="0" Grid.Column="0" Margin="1" Text="{Binding ¿xxx?}"&gt;&lt;/TextBlock&gt;
  &lt;ListBox Name="listBox1" Grid.Row="1" Grid.ColumnSpan="2" Margin="1" ItemsSource="{Binding Model.BinariesToDeploy}" IsSynchronizedWithCurrentItem="True" /&gt;
  </code></pre>
  
  <p>Hope its clear.</p>