xamarin.formstabbedpageswipeview

SwipeView re-enables TabbedPage.IsSwipePagingEnabled


My Xamarin.Forms app has a tabbedPage where I have blocked swiping between tabs as seen in the XAML code:

<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage 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:local="clr-namespace:MemoCourses.Views" 
        xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
        android:TabbedPage.IsSwipePagingEnabled="False"
        mc:Ignorable="d"
        BarBackgroundColor="DarkOliveGreen"
        BarTextColor="White"
        SelectedTabColor="White"
        IsEnabled="True"
        Title="{Binding NomListe}"
        x:Class="MemoCourses.Views.PanierPage">

<local:Panier_achatsPage />
<local:Panier_panierPage />
On the tab of the tabbed page, I have a Listview with rows that can be swiped with the SwipeView statement. As soon as we use the drag, it reactivates the swipe between the tabs of the TabbedPage. This problem has already been described here: https://github.com/xamarin/Xamarin.Forms/issues/14364

Has the problem been fixed? If not, is there a solution to block the swipe between tabs pages? Thank you for your help.


Solution

  • From the GitHub thread you posted, this issue now has been fixed.

    You may try updating the xamarin forms version (5.0.0.2291 or above) for both shared and android project. After that, clean the solution and rebuild the project.

    You may also check the update for shared and android project:

    <ItemGroup>
        <PackageReference Include="Xamarin.Forms" Version="5.0.0.2612" />
    ...
    </ItemGroup>
    

    It works on my end.

    Hope it helps!