c# - Using enum as a dependency property in WPF -


I tried to use the enum type as a dependency properties in your custom controls do, but always get an error is:

  public enum Mulyvidon {first = 1 second = 2, third = 3, fourth = 4, PriceCatProperty dependency property for the fifth = 5, read the sixth = 6} public static = DependencyProperty.Register ( "PriceCat", typeof (PriceCategories), Taipf (Kstkantrol), new property Matdeta (Praijhseedent S. First)); }; Public PriceCategories PriceCat // Here I get an error "Expected class, delegate, Enum, interface or structure" {get {return (PriceCategories) GetValue (PriceCatProperty); } Set {set value (pricecotproperty, value); }}  

Please see where is the fault?

Do not be declared within the scope of class to your DP. It seems that you have an additional closing brace after the DP announcement.

  Public anonymous price segments {// ...} public static redonline dependency property PriceCatProperty = DependencyProperty.Register ("PriceCat", typeof price credentials), typef (cutcroll), new property matadata ( Primcand.first)); }; // & lt; - it's probably off the square containing  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -