title: Show enum in a comboBox
body: <pre><code>&lt;Grid
      xmlns:local="clr-namespace:SortedEnumInComboBox"
      xmlns:sys="clr-namespace:System;assembly=mscorlib" 
      xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"&gt;
  &lt;Grid.Resources&gt;
    &lt;CollectionViewSource x:Key="ComparatorsView"&gt;
  
      &lt;CollectionViewSource.Source&gt;
        &lt;ObjectDataProvider 
          MethodName="GetNames" 
          ObjectType="{x:Type sys:Enum}"&gt;
          &lt;ObjectDataProvider.MethodParameters&gt;
            &lt;x:Type TypeName="local:Comparators"/&gt;
          &lt;/ObjectDataProvider.MethodParameters&gt;
        &lt;/ObjectDataProvider&gt;
      &lt;/CollectionViewSource.Source&gt;
    &lt;/CollectionViewSource&gt;
  &lt;/Grid.Resources&gt;
  
  &lt;ComboBox 
    DataContext="{StaticResource ComparatorsView}" 
    ItemsSource="{Binding}" 
    VerticalAlignment="Center" /&gt;
  </code></pre>
  
  <p>  </p>
  
  <pre><code>public enum Comparators
  {
      MinorThan = -1, Equals = 0, GreaterThan = 1
  }
  </code></pre>
  
  <p>I'm trying to set the enum in a comboBox. In Display must show <code>&lt;, =, and &gt;</code> and <code>SelectedValue</code> will be <code>Comparators</code> value.</p>
  
  <p>I'm not sure if am I use a converter or what?</p>