Created
July 29, 2019 05:46
-
-
Save AlejandroRuiz/ae0d4f21f7aefbde756bb3fa2b756620 to your computer and use it in GitHub Desktop.
CollectionView Xamarin Forms
This file contains hidden or 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
<!-- | |
REGULAR COLLECTION VIEW(LISTVIEW STYLE) | |
--> | |
<CollectionView ItemsSource="{Binding Cards}"> | |
<CollectionView.ItemTemplate> | |
<DataTemplate> | |
<views:HomeCardView /> | |
</DataTemplate> | |
</CollectionView.ItemTemplate> | |
</CollectionView> | |
<!-- | |
COLLECTION VIEW WITH GRID LAYOUT DEFINITION | |
--> | |
<CollectionView BackgroundColor="{StaticResource AppBackgroundColor}" ItemsSource="{Binding Cards}"> | |
<CollectionView.ItemsLayout> | |
<GridItemsLayout Orientation="Vertical" Span="2" /> | |
</CollectionView.ItemsLayout> | |
<CollectionView.ItemTemplate> | |
<DataTemplate> | |
<views:SquareCardView /> | |
</DataTemplate> | |
</CollectionView.ItemTemplate> | |
</CollectionView> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment