Hello,
If you use <ListView>
in the <VerticalStackLayout>
, Here is a known issue about ListView and CollectionView do not scroll in a VerticalStackLayout.
And if you get height in the background, this value will be -1, you cannot get the specific value.
You can achieve it by <Grid>
. I set the listview's row height to 9*, Frame's height to *, you can change it by your layout.
<Grid x:Name="vsLayout" VerticalOptions="Fill"
BackgroundColor="#E81A1A">
<Grid.RowDefinitions>
<RowDefinition Height="9*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ListView Grid.Row="0">
...
</ListView>
<Frame
Grid.Row="1"
x:Name="fFooter"
CornerRadius="0"
Padding="15,1,0,0"
BackgroundColor="#0875D4"
HeightRequest="20"
HorizontalOptions="Fill">
<Label x:Name="Total" Text="Total: $" TextColor="White" Margin="0,0,5,0"/>
</Frame>
</Grid>
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.