Changed Xamarin Basket scroll

This commit is contained in:
Javier Suárez Ruiz 2017-01-11 13:31:07 +01:00
parent 5f32ca1947
commit d8a075f760

View File

@ -62,7 +62,6 @@
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!-- HEADER --> <!-- HEADER -->
<Grid <Grid
@ -71,39 +70,42 @@
Text="SHOPPING CART" Text="SHOPPING CART"
Style="{StaticResource ShoppingCartStyle}"/> Style="{StaticResource ShoppingCartStyle}"/>
</Grid> </Grid>
<!-- ITEMS --> <ScrollView
<ListView Grid.Row="1">
Grid.Row="1" <StackLayout>
ItemsSource="{Binding BasketItems}" <!-- ITEMS -->
behaviors:ItemTappedCommandListViewBehavior.ItemTappedCommand="{Binding AddCommand}" <ListView
HeightRequest="{Binding BasketItems.Count, Converter={StaticResource ItemsToHeightConverter}}" ItemsSource="{Binding BasketItems}"
HasUnevenRows="True" behaviors:ItemTappedCommandListViewBehavior.ItemTappedCommand="{Binding AddCommand}"
SeparatorVisibility="None" HeightRequest="{Binding BasketItems.Count, Converter={StaticResource ItemsToHeightConverter}}"
VerticalOptions="FillAndExpand" HasUnevenRows="True"
CachingStrategy="RecycleElement"> SeparatorVisibility="None"
<ListView.ItemTemplate> VerticalOptions="FillAndExpand"
<DataTemplate> CachingStrategy="RecycleElement">
<ViewCell> <ListView.ItemTemplate>
<templates:BasketItemTemplate /> <DataTemplate>
</ViewCell> <ViewCell>
</DataTemplate> <templates:BasketItemTemplate />
</ListView.ItemTemplate> </ViewCell>
</ListView> </DataTemplate>
<!-- TOTAL --> </ListView.ItemTemplate>
<StackLayout </ListView>
Grid.Row="2" <!-- TOTAL -->
Margin="0,0,0,24"> <StackLayout
<Label Margin="0,0,0,24">
Grid.Row="0" <Label
Text="TOTAL" Grid.Row="0"
TextColor="{StaticResource BlackColor}" Text="TOTAL"
Style="{StaticResource CartTotalStyle}"/> TextColor="{StaticResource BlackColor}"
<Label Style="{StaticResource CartTotalStyle}"/>
Grid.Row="1" <Label
Text="{Binding Total, StringFormat='${0:N}'}" Grid.Row="1"
TextColor="{StaticResource GreenColor}" Text="{Binding Total, StringFormat='${0:N}'}"
Style="{StaticResource CartTotalStyle}"/> TextColor="{StaticResource GreenColor}"
</StackLayout> Style="{StaticResource CartTotalStyle}"/>
</StackLayout>
</StackLayout>
</ScrollView>
</Grid> </Grid>
</Grid> </Grid>
<!-- CHECKOUT --> <!-- CHECKOUT -->