Created
May 4, 2017 14:16
-
-
Save rasmuschristensen/06936c5c389a40b1f2e586e5d9d56a75 to your computer and use it in GitHub Desktop.
How to use WrapPanel
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
<ScrollView> | |
<appControls:WrapLayout | |
Margin="2" | |
VerticalOptions="FillAndExpand" | |
Spacing="6" | |
RowSpacing="10" | |
MaxColumns="3" | |
ItemsSource="{Binding Ads}" | |
x:Name="thelist"> | |
<appControls:WrapLayout.ItemTemplate> | |
<DataTemplate> | |
<Grid | |
RowSpacing="0"> | |
<Grid.RowDefinitions> | |
<RowDefinition | |
Height="auto"> | |
</RowDefinition> | |
<RowDefinition | |
Height="20"> | |
</RowDefinition> | |
</Grid.RowDefinitions> | |
<Image | |
Grid.Row="0" | |
Source="{Binding Image}" | |
Aspect="AspectFill"> | |
<Image.GestureRecognizers> | |
<TapGestureRecognizer | |
Command="{Binding BindingContext.AdSelected, Source={x:Reference adListPage}}" | |
CommandParameter="{Binding .}" /> | |
</Image.GestureRecognizers> | |
</Image> | |
<Label | |
Grid.Row="1" | |
HeightRequest="20" | |
StyleClass="AdListInfo" | |
VerticalOptions="End" | |
HorizontalTextAlignment="End" | |
Text="{Binding Price}"> | |
</Label> | |
</Grid> | |
</DataTemplate> | |
</appControls:WrapLayout.ItemTemplate> | |
</appControls:WrapLayout> | |
</ScrollView> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment