Forum Xamarin.Forms

Problems using ListView with SwipeView overlapping rows

ifoxbrifoxbr Member ✭✭


I am trying to slide the ListView item to the left to access the Delete button.
When I slide the second line after the first, the first line does not return to the original position and
when I slide the other lines to the left, ONLY the last line is shown correctly, in the lines above the lines are superimposed.

See image

See xaml code

                   <ListView.ItemTemplate >
                        <DataTemplate >
                            <ViewCell >
                                            <SwipeItems Mode="Reveal" >
                                                <SwipeItem Text="Excluir"          
                                                           CommandParameter="{Binding Source={x:Reference Item}, Path=BindingContext}"
                                                           Invoked ="IB_Invoked">

                                        <!-- conteudo do swipe view-->
                                        <Frame CornerRadius="20" Margin="1,1,1,1" HasShadow="True"  BorderColor="DarkBlue">
                                            <Grid x:Name="Item">
                                                    <RowDefinition Height="40"/>
                                                    <ColumnDefinition Width="50"/>
                                                    <ColumnDefinition Width="*"/>
                                                    <ColumnDefinition Width="60"/>
                                                    <ColumnDefinition Width="90"/>

                                                <Grid BackgroundColor="Blue">
                                                    <Label Grid.Row="0" Grid.Column="0" Text="{Binding QTY}"  Font="20" VerticalOptions="Center" HorizontalTextAlignment="Center" TextColor="White" />
                                                <StackLayout Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
                                                    <Label Text="{Binding DESCRIPTION}" VerticalTextAlignment="Center" Font="14" TextColor="Black" />
                                                <StackLayout Grid.Row="0" Grid.Column="2" Orientation="Horizontal" HorizontalOptions="End">
                                                    <Label Text="{Binding TOTAL, StringFormat='{0:N2}'}" VerticalTextAlignment="Center" Font="14" TextColor="Black" />

Best Answer


  • YelinzhYelinzh Member, Xamarin Team Xamurai
    edited May 2020

    @ifoxbr I created a basic demo to test the code and it works fine. Did you add other settings to the listView?

  • ifoxbrifoxbr Member ✭✭

    Tks Jarvan
    No,... the code is the same as above, except 'bindings' and I´m running on physical device. On android emulator also same results. My xamarin forms version is
    If I remove "Frame" SwipeView works as expected.

Sign In or Register to comment.