title: DatagridTemplateColumn/Combobox not showing ItemsSource
body: <p>In my ViewModel, I have a BindableCollection (using Caliburn Micro) of a Unit class.  The Unit class has two properties, UnitID (int) and UnitName (string). This collection is the ItemsSource for a ComboBox which is the DatagridTemplateColumn. I know that the BindableCollection is being populated but the Units are not being displayed in the ComboBox, nor are the UnitNames being displayed in the "From Unit" and "To Unit" columns.  </p>
  
  <p>Here is the important part of my ViewModel:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using Vulcan.Entities;
  using Vulcan.Conduits;
  using Caliburn.Micro;
  
  namespace Vulcan.ViewModels
  {
      public class EditUnitConversionsViewModel : Screen, IActiveContentViewModel
      {
          IUnitConversionConduit _conversionConduit;
          IUnitConduit _unitConduit;
          EventAggregator _eventAggregator;
  
          public BindableCollection&lt;UnitConversion&gt; UnitConversions { get; set; }
          public int SelectedConversionIndex { get; set; }
  
          public BindableCollection&lt;Unit&gt; Units { get; set; }
          public int SelectedFromUnitIndex { get; set; }
          public int SelectedToUnitIndex { get; set; }
  
  
          public EditUnitConversionsViewModel(IUnitConversionConduit conversionConduit, IUnitConduit unitConduit, EventAggregator agg)
          {
              _conversionConduit = conversionConduit;
              _unitConduit = unitConduit;
              _eventAggregator = agg;
  
              Units = new BindableCollection&lt;Unit&gt;(_unitConduit.GetUnits());
              UnitConversions = new BindableCollection&lt;UnitConversion&gt;(_conversionConduit.GetUnitConversions().Select(c =&gt; new UnitConversion(c, _unitConduit)));
          }
  </code></pre>
  
  <p>Here are the Unit and UnitConversion classes:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace Vulcan.Entities
  {
      public class Unit
      {
          private int _unitID;
          public int UnitID
          {
              get { return _unitID; }
              set { _unitID = value; }
          }
  
          private string _unitName;
          public string UnitName
          {
              get { return _unitName; }
              set { _unitName = value; }
          }
  
          public Unit(int unitID, string unitName)
          {
              this.UnitID = unitID;
              this.UnitName = unitName;
          }
      }
  }
  
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  
  namespace Vulcan.Entities
  {
      public class UnitConversion
      {
          public int UnitConversionID { get; set; }
  
          public int FromUnitID { get; set; }
          public int ToUnitID { get; set; }
  
          //Ex. meters to millimeters: ConversionFactor = 1000, Offset = 0
          // Fahrenheit to Celsius: Conversion Factor = 0.5556, Offset = 17.7778
          public double ConversionFactor { get; set; }
          public double Offset { get; set; }
  
          public UnitConversion(int id, int fromUnit, int toUnit, double conversionFactor, double offset)
          {
              this.UnitConversionID = id;
              this.FromUnitID = fromUnit;
              this.ToUnitID = toUnit;
              this.ConversionFactor = conversionFactor;
              this.Offset = offset;
          }
      }
  }
  </code></pre>
  
  <p>Here is my current XAML:</p>
  
  <pre><code>&lt;DataGrid.Columns&gt;
      &lt;DataGridTemplateColumn Header="From Unit" Width="*"&gt;
          &lt;DataGridTemplateColumn.CellTemplate&gt;
               &lt;DataTemplate&gt;
                    &lt;ComboBox DisplayMemberPath="UnitName" SelectedValuePath="UnitID" 
                                              SelectedValue="{Binding Path=FromUnitID}"
                                              ItemsSource="{Binding Path=Units}" /&gt;
               &lt;/DataTemplate&gt;
          &lt;/DataGridTemplateColumn.CellTemplate&gt;
      &lt;/DataGridTemplateColumn&gt;
      &lt;DataGridTemplateColumn Header="To Unit" Width="*"&gt;
           &lt;DataGridTemplateColumn.CellTemplate&gt;
                &lt;DataTemplate&gt;
                    &lt;ComboBox DisplayMemberPath="UnitName" SelectedValuePath="UnitID" 
                                              SelectedValue="{Binding Path=ToUnitID}"
                                              ItemsSource="{Binding Units}" /&gt;
                 &lt;/DataTemplate&gt;
           &lt;/DataGridTemplateColumn.CellTemplate&gt;
       &lt;/DataGridTemplateColumn&gt;
       &lt;DataGridTextColumn Header="Conversion Factor" Binding="{Binding ConversionFactor}" Width="*" /&gt;
       &lt;DataGridTextColumn Header="Offset" Binding="{Binding Offset}" Width="*" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here is a screenshot of the DataGrid:
  <img src="https://i.stack.imgur.com/peB1P.png" alt="enter image description here"></p>
  
  <p>What do I need to change in my XAML to get the Units collection to show-up in the combo boxes?</p>