title: How do I select an item in my WPF ComboBox based on my data binding?
body: <p>I've got my DataContext set to a Book object.  Book has properties: Title, Category.</p>
  
  <p>I've got a CollectionViewSource "categoryList" that holds a list of Categories.</p>
  
  <p><strong>Question</strong>: How do I <em>select</em> the book's Category in this combobox?</p>
  
  <pre><code>&lt;TextBox Text="{Binding Path=Title}"/&gt;
  
  &lt;ComboBox SelectedValuePath="Id" 
            SelectedValue="{Binding Path=Category.Id}" 
            SelectedItem="{Binding Path=Category}"
            ItemsSource="{Binding Source = {StaticResource categoryList}}" 
            DisplayMemberPath="Name" /&gt;
  </code></pre>
  
  <p>The code above displays the Book's title correctly and then it displays the list of category names in the combobox.  But it does not select the Book's Category. It instead just selects the first item in the list.</p>