5
में एक निर्भरता संपत्ति के रूप में enum का उपयोग करते हुए मैं अपने कस्टम नियंत्रण में एक निर्भरता संपत्ति के रूप में enum प्रकार का उपयोग करने का प्रयास करें, लेकिन हमेशा कोई त्रुटि मिलती है:WPF
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); }
}
कृपया, देखो। गलती कहां है?
ओह, हाँ यह यह ब्रेस है। धन्यवाद! – rem