title: wpf enum databinding
body: <p>I have a class BatchInfoViewModel that contains an enum:</p>
  
  <pre><code>namespace MyStuff.ViewModel
  {
      public class BatchInfoViewModel : ObservableObject
      {
          public enum TimeFrame
          {
              Today,
              Last7days,
              Last30days,
              Last6months,
              Last12months,
              All
          }
      }
  }
  </code></pre>
  
  <p>and a user control 'BatchInfoView' that uses a BatchInfoViewModel and I'm trying to bind a combobox in this view, to the TimeFrame enum on the model, but every resource I've found shows what I think is the method I'm using, but I keep getting Type not found exceptions when running.</p>
  
  <pre><code>&lt;UserControl x:Class="MyStuff.View.BatchInfoView"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
           xmlns:view="clr-namespace:MyStuff.View"
           xmlns:viewModel="clr-namespace:MyStuff.ViewModel;assembly=MyStuff.ViewModel"
           xmlns:sys="clr-namespace:System;assembly=mscorlib"&gt;    
  &lt;UserControl.Resources&gt;
      &lt;ObjectDataProvider x:Key="EnumDataProvider"                              
                          MethodName="GetValues"                              
                          ObjectType="{x:Type sys:Enum}"&gt;
          &lt;ObjectDataProvider.MethodParameters&gt;
  
   &lt;!--None of these work at all, I'm lost :( I've tried variations of these: --&gt;
   &lt;!--&lt;viewModel:BatchInfoViewModel&gt;&lt;/viewModel:BatchInfoViewModel&gt;
   &lt;x:Type TypeName="viewModel:TimeFrame"/&gt;
   &lt;x:Type TypeName="BatchInfoViewModel:TimeFrame"/&gt;--&gt;
  
  
          &lt;/ObjectDataProvider.MethodParameters&gt;
      &lt;/ObjectDataProvider&gt;
  </code></pre>
  
  <p>It can't find the Types and will throw an exception.</p>