Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Two columns layout example
<CollectionView ItemsSource="{Binding PokemonList}" x:Name="collectionView">
<CollectionView.ItemsLayout>
<GridItemsLayout Orientation="Vertical" Span="2"/>
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Image Grid.RowSpan="2"
Source="{Binding ImageURL}"
WidthRequest="60"
HeightRequest="60"
Aspect="AspectFill"/>
<Label Grid.Column="1"
Text="{Binding name.english}"
FontAttributes="Bold"
TextColor="Blue"/>
<Label Grid.Row="1"
Grid.Column="1"
Text="{Binding Types}"
TextColor="Orange"
FontAttributes="Italic"
VerticalOptions="End"/>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.