Created
July 7, 2019 18:51
-
-
Save icebeam7/253facb6531ad4c94d221d7ab9e72949 to your computer and use it in GitHub Desktop.
Two columns layout example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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