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

后端 未结 1 431
南方客
南方客 2020-12-05 18:13

Normally, when I assign an enum value to a XAML attribute (usually the \"Tag\"), I use:




        
相关标签:
1条回答
  • 2020-12-05 18:56

    To access a nested class/struct/enum in XAML, use + as a separator.

    <XamlElement Tag="{x:Static local:MyClass+EnumName.enumValue1}"/>
    
    0 讨论(0)
提交回复
热议问题