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

Is there an open source WebSockets (JavaScript) XMPP library? -

java - Is there an object like a "Set" that can contain only unique string values, but also contain a count on the number of occurrences of the string value? -

iphone - How do I make a UIPickerView in a UIActionSheet -