title: How to bind an Enum from ViewModel to ComboBox - twoway
body: <p><strong>[Solved]</strong>: I have provided a working example in the answer below.
  <hr>
  Related thread on [SO][1]</p>
  
  <p>I have read many threads here, how to bind an enum to a combobox.
  I got it to work oneway with another approach using a MarkupExtension!
  But then I don't have twoway binding available.<br><br>
  I want to bind it to an Enum property of my ViewModel.</p>
  
  <p>When I try this approach:</p>
  
  <pre><code> &lt;Window.Resources&gt;
      &lt;ObjectDataProvider MethodName="GetValues"
                          ObjectType="{x:Type sys:Enum}"
                          x:Key="DetailScopeDataProvider"&gt;
          &lt;ObjectDataProvider.MethodParameters&gt;
              &lt;x:Type TypeName="local:DetailScope" /&gt;
          &lt;/ObjectDataProvider.MethodParameters&gt;
      &lt;/ObjectDataProvider&gt;
  </code></pre>
  
  <p>One further problem here is, that VS intellisense does not offer me this:</p>
  
  <blockquote>
    <p>sys:Enum</p>
  </blockquote>
  
  <p>I also don't know to setup the ItemSource and SelectedValue property of the combobox.</p>