title: Using enum as a dependency property in WPF
body: <p>I try to use enum type as a dependency property in my custom control, but always get an error:</p>
  
  <pre><code>public enum PriceCategories
      {
          First = 1,
          Second = 2,
          Third = 3,
          Fourth = 4,
          Fifth = 5,
          Sixth = 6
      }
      public static readonly DependencyProperty PriceCatProperty =
  DependencyProperty.Register("PriceCat", typeof(PriceCategories), typeof(CustControl), new PropertyMetadata(PriceCategories.First));
  };
  
      public PriceCategories PriceCat  // here I get an error "Expected class, delegate, enum, interface or struct"
      {
          get { return (PriceCategories)GetValue(PriceCatProperty); }
          set { SetValue(PriceCatProperty, value); }
      }
  </code></pre>
  
  <p>Please, look. Where is mistake?</p>