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

Xamarin Grid - Binding to collection of items

$
0
0

Hi,

I have a simple Grid:

<Grid>
         <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto" />
          <ColumnDefinition Width="Auto" />
          <ColumnDefinition Width="100" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Label Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" XAlign="Center" Text="First" />
        <Label Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2" XAlign="Center" Text="Second" />
        <Label Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="1" XAlign="End" Text="Minute" />
        <Label Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="1" XAlign="End" Text="Hour" />
        <Label Grid.Row="1" Grid.Column="3" Grid.ColumnSpan="1" XAlign="End" Text="Day" />
        <Label Grid.Row="1" Grid.Column="4" Grid.ColumnSpan="1" XAlign="End" Text="Week" />
    </Grid>
    </StackLayout>

For this Grid, I receive an arbitrary number of elements/rows, I have to display, but I couldn't find a solution to bind my collection of entities to that grid.

Anyone with a suggestion?

Thank You!
Best


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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