title: WPF Combobox with ItemsSource - What path do I set to access this databinding?
body: <p>I'm having a problem setting the Binding/Path property in my XAML.</p>
  
  <p>I know this ComboBox's <code>ItemSource</code> property is updating properly, since I get a bunch of empty text-boxes when I update the <code>viewmodel</code> (instead of textboxes with text, which is what I expect).</p>
  
  <p>So I believe the Binding in the <code>DataTemplate</code> section of my ComboBox needs a different binding path, but I'm not sure what to set the binding path to.</p>
  
  <pre><code>&lt;ComboBox ItemsSource="{Binding Path=Locations}" Visibility="{Binding SettingsOptionsVisibility}" Grid.Column="0" x:Name="locationCB" VerticalAlignment="Top" SelectionChanged="locationCB_SelectionChanged"  HorizontalAlignment="Left" Width="350" Height="30" IsHitTestVisible="False" IsEnabled="False" Focusable="False"&gt;
      &lt;ComboBox.ItemTemplate&gt;
          &lt;DataTemplate&gt;
                  &lt;TextBlock  Text="{Binding Name}"&gt;&lt;/TextBlock&gt;
          &lt;/DataTemplate&gt;
      &lt;/ComboBox.ItemTemplate&gt;
  &lt;/ComboBox&gt;
  </code></pre>
  
  <p><strong>Here's a picture of my LocationCB's ItemsSource in the Watch List in my Codebehind:</strong> <a href="https://imgur.com/x4SYWER" rel="nofollow noreferrer">http://imgur.com/x4SYWER</a></p>
  
  <p>As expected, my combobox is populated with 8 (textless) elements. What do I need to do to get my binding the text to Name to connect up?</p>
  
  <p>EDIT: code for the Locations object in the ViewModel:</p>
  
  <pre><code>public ObservableCollection&lt;Location&gt; Locations { get; set; }
  </code></pre>
  
  <p>And code for the Location class wrapped in the observable collection, as requested:</p>
  
  <pre><code>public class Location
  {
      public Guid LocationID;
      public Guid ParentID;
      public String Name;
      public bool isValid;
  }
  </code></pre>