title: WPF : Binding a combo-box to an enum property of a class object?
body: <p>In the namespace <code>X</code>, I've got a public enum definition :</p>
  
  <pre><code>namespace X
  {
      public enum MyEnum
      { val0=0, val1, val2, val3, val4 }
  }
  </code></pre>
  
  <p>In the namespace <code>Y</code> I've got a class which has a property of the <code>X.MyEnum</code> type</p>
  
  <pre><code>using namespace X;
  namespace Y
  {
      class Container
      {
          public MyEnum MYEnum
          { get { return m_myenum; } set { m_myenum = value; } }
  
          private MyEnum m_myenum;
      }
  }
  </code></pre>
  
  <p>I've created an user control which contains a <code>ComboBox</code>. I'd very much like to databind it (TwoWay) to the <code>MYEnum</code> field of the "Container". The usercontrol resides in the window.</p>
  
  <p>How do I achieve that? I've seen some examples with <code>ObjectDataProvider</code>, however I'm lost.</p>