We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Experiencing a few issues with ListView containing CardLayout & CardView

Thread ID:





144894 May 28,2019 03:51 AM UTC May 31,2019 11:27 AM UTC Xamarin.Forms 5
Tags: SfListView
Brian Adams
Asked On May 28, 2019 03:51 AM UTC

Hi, I can upload privately but I wanted to start this thread publicly because it looks like others may be experiencing these issues too.

I'm using ListView in a Master Detail Page and the Cards are swipable even though I have AllowSwiping="false" and like others I'm getting blank list for the first call.  Once I call it again it shows the list but cards are still swipable.  
I can share part of the Xaml and the TournamentView is only a StackLayout with a grid.   I'm using your latest vesrion Xamarin.Forms

   <StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand"  HorizontalOptions="FillAndExpand">
                                <sync:SfListView x:Name="listViews" ItemsSource="{Binding Tournaments}" IsScrollBarVisible="true" VerticalOptions="CenterAndExpand" HorizontalOptions="CenterAndExpand" SelectionMode="None" AllowSwiping="false"   
                                                 BackgroundColor="White" Orientation="Vertical" FocusBorderColor="Transparent" FocusBorderThickness="0" ItemSize="235" ItemSpacing="0,5,0,5" AutoFitMode="Height" SwipeOffset="100">
                                        <behaviors:EventToCommandBehavior EventName="ItemTapped"
                                                                          Command="{Binding BindingContext.TournamentSelectedCommand,Source={x:Reference masterDetailPage}}" />
                                            <sync:SfListView.ItemTemplate >
                                                <DataTemplate >
                                                    <card:SfCardLayout  x:Name="cardLayout" BackgroundColor="White"  HorizontalOptions="Fill" VerticalOptions="Fill" HeightRequest="235" > 
                                                        <card:SfCardView x:Name="cardView" HasShadow="true"  ShadowColor="Black" CornerRadius="12" BorderColor="White"  IndicatorThickness="10" IndicatorPosition="Bottom" IndicatorColor="DarkGray" >
                                                            <controls:TournamentView  />

Gnana Priya Namasivayam [Syncfusion]
Replied On May 28, 2019 04:04 PM UTC

Hi Brain, 

Thanks for using Syncfusion products. 

We have checked the reported query by replacing your SfListView in MasterDetail page. ListView didn’t swipe as reported and can you please explain how you call the page with listview each time. Can you please explain us the case in which issue reproduces. We have attached the tested sample for your reference, please find the sample from below link. 

Can you please check with the above sample whether issue reproduces in our sample also. If not, please revert us back with the issue reproducible sample. So that we could able to reproduce and analyze the reported issue better and provide appropriate solution at our end. 

Gnana Priya N 

Brian Adams
Replied On May 29, 2019 01:30 PM UTC

This code crashes is failing to load sfListViewSample.App

Attachment: runtimecrash.txt_43cf675d.zip

Dinesh Babu Yadav [Syncfusion]
Replied On May 30, 2019 08:19 AM UTC

Hi Brian, 
Apologize for the inconvenience. 
We have resolved the reported error “Xamarin.Forms.Xaml.XamlParseException” in the given sample. Could you please check with the following sample? 
Dinesh Babu Yadav 

Brian Adams
Replied On May 30, 2019 06:41 PM UTC

Ah ha! I think it's in the CardLayout.  try the attached, the cards are now swipable. :) . Bug or am I the Bug???
Thank you! 

Attachment: Swipe_2_c400c412.zip

Dinesh Babu Yadav [Syncfusion]
Replied On May 31, 2019 11:27 AM UTC

Hi Brian, 
We would like to inform you that you must define SwipeToDismiss property as False to card view and then load the cardView directly to Itemtemplate without SfCardLayout to avoid swiping. We have modified the sample for your reference, please find the  refer the following link from below. 
<StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand"  HorizontalOptions="FillAndExpand"> 
            <sync:SfListView x:Name="listView" ItemsSource="{Binding MusicInfo}"> 
                <sync:SfListView.ItemTemplate > 
                            <card:SfCardView x:Name="cardView" SwipeToDismiss="False"> 
                                <Grid RowSpacing="0" ColumnSpacing="0"> 
                                        <RowDefinition Height="*"></RowDefinition> 
                                        <RowDefinition Height ="30"></RowDefinition> 
                                    <Label Text="{Binding SongTitle}" Margin="5,5,0,0" ></Label> 
                                    <Label Grid.Row="1" Text="{Binding SongAuther}" FontSize="8"  Margin="5,0,0,0"></Label> 
To know more about card view , please refer our documentation here. 
Please let us know if you have any further queries. 
Dinesh Babu Yadav 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon