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

CollectionView Grid Span

$
0
0

Hi,

I am having some issues with the CollectionView I am running Xamarin.Forms 4.00 pre-8 with the below XAML

 <CollectionView ItemsSource="{Binding Media, Mode=OneWay}" ItemSizingStrategy="MeasureAllItems">
                          <CollectionView.ItemsLayout>
                              <GridItemsLayout Orientation="Horizontal" Span="3"/>
                          </CollectionView.ItemsLayout>
                      <CollectionView.ItemTemplate>
                          <DataTemplate>
                            <Grid Padding="0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="100" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="100" />
                                </Grid.RowDefinitions>
                                  <Image Aspect="AspectFill" Source="{Binding .} "/>
                            </Grid>    
                          </DataTemplate>
                      </CollectionView.ItemTemplate>
                  </CollectionView>

This is rendering the view as below

Why would this be? I thought the views should render as a Grid with 3 columns and 2 rows?

Thanks in advance.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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