Skip to content

x:Array equivelent in WinUI? #8174

Answered by MikeHillberg
sam-wheat asked this question in Q&A
Discussion options

You must be logged in to vote

There's no x:Array support, so what I do for this case is make a helper:

    public class List : List<object>
    {
        public List() { }
    }

And then:

<local:DropDownButton.ItemsSource>
    <local:List>
        <local:DimensionAction>SortAscending</local:DimensionAction>
        <local:DimensionAction>SortDescending</local:DimensionAction>
        <local:DimensionAction>Hide</local:DimensionAction>
    </local:List>
</local:DropDownButton.ItemsSource>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sam-wheat
Comment options

Answer selected by sam-wheat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants