У меня два списка на одной странице, но проблема заключается в том, что при обновлении просмотра списка обновляется только один список, а при прокрутке просмотра списка также одна прокрутка просмотра списка,
для получения дополнительной информации, я не могу объединить два списка в одном, потому что у меня есть некоторые случаи с списком вложений
код xaml
<StackLayout>
<ListView x:Name="detailsList" HeightRequest="5000" ItemsSource="{Binding DetailsList}"
IsPullToRefreshEnabled="true" RefreshCommand="{Binding RefreshCommand}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal" Padding="5">
<StackLayout HorizontalOptions="FillAndExpand">
<es:Label Text="{Binding Value}" VerticalTextAlignment="Center" HorizontalOptions="EndAndExpand" />
<BoxView BackgroundColor="#eeeeee" HeightRequest="2" />
</StackLayout>
<StackLayout Padding="0,0,0,2">
<es:Label Text="{Binding Key}" WidthRequest="100" MinimumWidthRequest="100" TextColor="{Binding Color}"
HorizontalTextAlignment="Start" VerticalTextAlignment="Center" />
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<ListView x:Name="Attachments" ItemsSource="{Binding Attachments}" SeparatorVisibility="None" BackgroundColor="White" HasUnevenRows="true" SelectionMode="None"
IsPullToRefreshEnabled="false" RefreshCommand="{Binding RefreshCommand}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell Tapped="Attachment_Tapped">
<StackLayout Orientation="Horizontal" Padding="5">
<StackLayout HorizontalOptions="FillAndExpand">
<es:Label Text="{Binding Value.AttachmentTitle}" VerticalTextAlignment="Center" HorizontalOptions="EndAndExpand"/>
<Image Source="attach.png" HorizontalOptions="EndAndExpand"></Image>
<BoxView BackgroundColor="#eeeeee" HeightRequest="2" />
</StackLayout>
<StackLayout Padding="0,0,0,2">
<es:Label Text="{Binding Key}" WidthRequest="100" MinimumWidthRequest="100" TextColor="{Binding Color}"
HorizontalTextAlignment="Start" VerticalTextAlignment="Center" />
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
Я пытаюсь сделать этот код, но все еще не работает, и я попробуйте сделать ListView.FooterTemplate
но безрезультатно
<StackLayout>
<ListView x:Name="detailsList" HeightRequest="5000" ItemsSource="{Binding DetailsList}"
IsPullToRefreshEnabled="true" RefreshCommand="{Binding RefreshCommand}">
<ListView.HeaderTemplate>
<DataTemplate>
<ListView x:Name="Attachments" ItemsSource="{Binding Attachments}"
IsPullToRefreshEnabled="false" RefreshCommand="{Binding RefreshCommand}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell Tapped="Attachment_Tapped">
<StackLayout Orientation="Horizontal" Padding="5">
<StackLayout HorizontalOptions="FillAndExpand">
<es:Label Text="{Binding Value.AttachmentTitle}" VerticalTextAlignment="Center" HorizontalOptions="EndAndExpand"/>
<Image Source="attach.png" HorizontalOptions="EndAndExpand"></Image>
<BoxView BackgroundColor="#eeeeee" HeightRequest="2" />
</StackLayout>
<StackLayout Padding="0,0,0,2">
<es:Label Text="{Binding Key}" WidthRequest="100" MinimumWidthRequest="100" TextColor="{Binding Color}"
HorizontalTextAlignment="Start" VerticalTextAlignment="Center" />
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</DataTemplate>
</ListView.HeaderTemplate>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Horizontal" Padding="5">
<StackLayout HorizontalOptions="FillAndExpand">
<es:Label Text="{Binding Value}" VerticalTextAlignment="Center" HorizontalOptions="EndAndExpand" />
<BoxView BackgroundColor="#eeeeee" HeightRequest="2" />
</StackLayout>
<StackLayout Padding="0,0,0,2">
<es:Label Text="{Binding Key}" WidthRequest="100" MinimumWidthRequest="100" TextColor="{Binding Color}"
HorizontalTextAlignment="Start" VerticalTextAlignment="Center" />
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
спасибо заранее :)) 1014 *