How to use FlexLayout in a MVVM framework?

MarcLuderMarcLuder CHMember ✭✭

I can fill a FlexLayout dynamically with labels from a collection in the code behind like that (labels are wrapped to several rows):

       foreach (WordItem item in _items)
        {
            Label label = new Label
            {
                Text = item.Name,
                Margin = new Thickness(2, 0, 2, 0),
                FontSize = 16,
                TextColor = Color.Black,
                BackgroundColor = Color.AliceBlue
            };

            flex1.Children.Add(label);
        }

But I can't imagine how to do it in a MVVM application (I'm using Prism/DryIoc). What would be the source property for binding dynamically several labels to the FlexLayout?
Every answer is appreciated!
Marc

Answers

Sign In or Register to comment.