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

Repeating XAML dynamically VS ListView

$
0
0

We made a XAML element that represents the items we'd like to populate without knowing how many there will be.

Aside from the ListView, is there a way to repeat XAML according to how many elements we have to show?

Look at this fantasy:

<foreach ItemsSource="{Binding Collection}">
    <Frame OutlineColor="#495051">
        <StackLayout HorizontalOptions="FillAndExpand"
                     VerticalOptions="FillAndExpand">
            <Label Text="{Binding Text}"
                   Font="Bold"
                   FontSize="Medium" />
            <Label Text="{Binding Detail}"
                   FontSize="Medium" />
        </StackLayout>
    </Frame>
</foreach>

What do you think?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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