title: WPF DataTemplate ComboBox binding issue
body: <p><strong>Edit: Rewritting question</strong></p>
  
  <p>I use the Project Management Library from <a href="http://dlhsoft.com/Home.aspx" rel="nofollow">http://dlhsoft.com/Home.aspx</a> in my WPF usercontrol.</p>
  
  <p>I'm displaying their LoadChartResourceListView control on my page and use a datatemplate to display custom columns in a list view:</p>
  
  <pre><code>&lt;my:LoadChartResourceListView TaskManagerSource="{Binding ElementName=ganttChartTaskListView,Path=TaskManager}" 
                                  TimelinePageStart="{Binding TimelinePageStart, ElementName=ganttChartTaskListView, Mode=TwoWay}"
                                  TimelinePageFinish="{Binding TimelinePageFinish, ElementName=ganttChartTaskListView, Mode=TwoWay}" 
                                  DisplayedTime="{Binding DisplayedTime, ElementName=ganttChartTaskListView, Mode=TwoWay}"
                                  Margin="6" Name="loadChartResourceListView"&gt;
          &lt;my:LoadChartResourceListView.View&gt;
              &lt;GridView ColumnHeaderContainerStyle="{StaticResource ListViewColumnHeaderContainerStyle}"&gt;
                  &lt;!-- Set CellTemplate (or CellTemplateSelector) to specify column templates. --&gt;
                  &lt;GridViewColumn Header="Group" Width="100"&gt;
                      &lt;GridViewColumn.CellTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;ComboBox Width="85" ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, 
                                  AncestorType={x:Type inf:MEFUserControl}}, Path=DataContext.ResourceGroups}" 
                                  DisplayMemberPath="GroupName"
                                  SelectedValuePath="GroupID" /&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/GridViewColumn.CellTemplate&gt;
                  &lt;/GridViewColumn&gt;  
                  &lt;GridViewColumn Header="Resource"&gt;
                      &lt;GridViewColumn.CellTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;TextBox x:Name="myTB" Text="{Binding Content}"/&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/GridViewColumn.CellTemplate&gt;
                  &lt;/GridViewColumn&gt;
  </code></pre>
  
  <p>The whole user control (inf:MEFUserControl) that contains this LoadChartResourceListView has a datacontext set to an instance of my viewmodel class (TaskData). Within the TaskData class is a <code>ObservableCollection&lt;ResourceGroup&gt; ResourceGroups {get;set;}</code>. Each ResourceGroup has an <code>int GroupID {get;set;}</code> and <code>string GroupName{get;set;}</code>.</p>
  
  <p>Also, within the TaskData class is an <code>ObservableCollection&lt;Resource&gt; Resources {get;set;}</code> ... each Resource has a int <code>GroupID{get;set;}</code>, string <code>Content {get;set;}</code> and <code>ResourceGroup ResGroup{get;set;}</code></p>
  
  <p>The above code works fine with displaying the combobox and the textbox... I cannot, for the life of me, figure out why I'm having issues binding to the SelectedValue property of the combobox. I've many things including <code>SelectedValue="{Binding GroupID}"</code></p>
  
  <p>Everytime I try to set the SelectedValue I receive this error popup in VS:
  "A first chance exception of type 'System.Reflection.AmbiguousMatchException' occurred in mscorlib.dll" This is the error from the output window (its massive) <a href="http://pastebin.com/AGJwn00C" rel="nofollow">http://pastebin.com/AGJwn00C</a> </p>
  
  <p>From reading, I've read that this is due to a parent object having a property with the same name "GroupID". I've renamed GroupID to ResGroupID in the Resource class, thinking that it conflicted with the ResourceGroup class, but I receive the same error.</p>
  
  <p>When I set this ItemsSource, is the DataContext for the combobox being set to the UserControl or TaskData instance?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I receive the error also when I use a TextBox instead of a combobox:</p>
  
  <pre><code>&lt;TextBox Text="{Binding GroupID}"/&gt;
  </code></pre>