Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Simple: Binding an IEnumerable ...is there a better way???

$
0
0

I'm tying to bind an IEnumerable<View> to a StackLayout.

My current solution is pretty weak Kung-Fu......

protected override void OnBindingContextChanged()
{
    base.OnBindingContextChanged();

    foreach(var v in ((MyViewModel)BindingContext).Views )
    { 
        MyDisplay.Children.Add(v);
    }
}

Is there a better way???


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>