How do you assign an enum, nested in a class, to a XAML attribute?

Viewed 6150

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?

1 Answers
Related