title: DataGridComboBoxColumn binding to List<Enum>
body: <p>I want to bind a list of enum values to a 'DataGridComboBoxColumn'.
  I've tried a lot, but nothing really works. </p>
  
  <p>Here is what I have:</p>
  
  <p>viewmodel-class:</p>
  
  <pre><code>public class ViewModel
      {
  
          public ViewModel()
          {
              TestCollection= new ObservableCollection&lt;MyEnum&gt;();
              AnyClasses = new ObservableCollection&lt;AnyClass&gt;();
  
              //... fill AnyClasses with stuff...
  
              TestCollection.Add(MyEnum.Value1);
              TestCollection.Add(MyEnum.Value2);
              TestCollection.Add(MyEnum.Value3);
              TestCollection.Add(MyEnum.Value4);
              TestCollection.Add(MyEnum.Value5);
  
          }
  
          public ObservableCollection&lt;MyEnum&gt; TestCollection { get; set; }
         public ObservableCollection&lt;AnyClass&gt; AnyClasses { get; private set; }
  
  }
  </code></pre>
  
  <p>my enum:</p>
  
  <pre><code>public enum MyEnum
      {
          Value1,
          Value2,
          Value3,
          Value4,
          Value5
      }
  </code></pre>
  
  <p>Codebehind:</p>
  
  <pre><code> public partial class WPFWindow
      {
          private ViewModel Vm { get; set; }
  
          public WPFWindow() 
          { 
              InitializeComponent(); 
              Vm = new ViewModel(); 
              DataContext = Vm; 
          }
  ...
      }
  </code></pre>
  
  <p>and finally the XAML:</p>
  
  <pre><code>&lt;DataGrid AutoGenerateColumns="False" Height="289" x:Name="dataGridAnything" ItemsSource="{Binding AnyClasses}" &gt;
    &lt;DataGrid.Columns&gt;
      &lt;DataGridComboBoxColumn Width="200" Header="Optionen" ItemsSource="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Window}, Path=DataContext.TestCollection}" SelectedValuePath="Value"/&gt;
    &lt;/DataGrid.Columns&gt;
  &lt;/DataGrid&gt;
  </code></pre>
  
  <p>If I start the project, nothing is displayed in the DataGridComboBoxColumn. What did I do wrong? Thx for you help.</p>
  
  <p>Edit: you can download the project (built with VS 2013) here: 
  <a href="http://www.file-upload.net/download-8896616/BindListOfEnumVS2013.zip.html" rel="nofollow">Download</a></p>