У меня 3 listViews
на одной странице, я получаю разрыв между каждым listview
, и я не знаю, почему он получает пробелы.
Вот мой код:
<Grid>
<ScrollView >
<StackLayout>
<ListView HasUnevenRows="True"
SeparatorColor="Red"
ItemsSource="{Binding GetAssignedTask}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal"
BackgroundColor="White" >
<Image Source="rsz_pnglogocom.png" />
<StackLayout>
<Label Text="Task 1"
TextColor="Black"
FontSize="Medium" />
<StackLayout Orientation="Horizontal">
<Label Margin="0,0,70,0"
Text="{Binding dtStart,StringFormat='{0:MMMM dd, yyyy}'}"
TextColor="Red"
HorizontalOptions="Center"/>
<Label Text="Waqas"
TextColor="Black"
HorizontalOptions="End"/>
</StackLayout>
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<StackLayout>
<Label Text="test"/>
</StackLayout>
<ListView HasUnevenRows="True"
SeparatorColor="Red"
ItemsSource="{Binding GetAssignedTask}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal"
BackgroundColor="LightPink" >
<Image Source="rsz_pnglogocom.png" />
<StackLayout>
<Label Text="Task 1"
TextColor="Black"
FontSize="Medium" />
<StackLayout Orientation="Horizontal">
<Label Margin="0,0,70,0"
Text="{Binding dtStart,StringFormat='{0:MMMM dd, yyyy}'}"
TextColor="Red"
HorizontalOptions="Center"/>
<Label Text="Waqas"
TextColor="Black"
HorizontalOptions="End"/>
</StackLayout>
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ScrollView>
</Grid>
Мне нужно избавиться от этих пробелов и отображать listview
один за другим, вы можете проверить изображение ниже, как показано listviews
.

Кто-нибудь может подсказать, как убрать эти пробелы?