Normally, when I assign an enum value to a XAML attribute (usually the "Tag"), I use:
<XamlElement Tag="{x:Static local:EnumName.EnumValue}"/>
Now, I have an enum defined inside of a class. e.g.:
public class MyClass{
public enum MyEnum {
enumValue1,
enumValue2
}
}
I try to assign this in XAML as:
<XamlElement Tag="{x:Static local:MyClass.EnumName.enumValue1}"/>
and it doesn't work.
Can anyone tell me the correct way to accomplish this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…