¡Hola!
El otro día me encontré con un pequeño (no tan pequeño) problema utilizando el control CardView donde cada elemento del carrusel era un ListView. Algo parecido a lo siguiente:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
| <?xml version="1.0" encoding="utf-8"?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:cards="clr-namespace:PanCardView;assembly=PanCardView"
mc:Ignorable="d"
x:Name="this"
x:Class="FixListViewWithCardsView.MainPage">
<cards:CarouselView
ItemsSource="{Binding Novels}">
<cards:CarouselView.ItemTemplate>
<DataTemplate>
<ListView
IsPullToRefreshEnabled="True"
RefreshCommand="{Binding Source={x:Reference this},Path=BindingContext.RefreshNovelCommand}"
ItemsSource="{Binding Characters}">
<ListView.Header>
<Label
FontSize="Large"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"
HeightRequest="150"
Text="{Binding Title}"/>
</ListView.Header>
</ListView>
</DataTemplate>
</cards:CarouselView.ItemTemplate>
</cards:CarouselView>
</ContentPage> |
<?xml version="1.0" encoding="utf-8"?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:cards="clr-namespace:PanCardView;assembly=PanCardView"
mc:Ignorable="d"
x:Name="this"
x:Class="FixListViewWithCardsView.MainPage">
<cards:CarouselView
ItemsSource="{Binding Novels}">
<cards:CarouselView.ItemTemplate>
<DataTemplate>
<ListView
IsPullToRefreshEnabled="True"
RefreshCommand="{Binding Source={x:Reference this},Path=BindingContext.RefreshNovelCommand}"
ItemsSource="{Binding Characters}">
<ListView.Header>
<Label
FontSize="Large"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"
HeightRequest="150"
Text="{Binding Title}"/>
</ListView.Header>
</ListView>
</DataTemplate>
</cards:CarouselView.ItemTemplate>
</cards:CarouselView>
</ContentPage>
Continúa leyendo Problema con ListView dentro de un CardView en Xamarin Forms