无法从iOS中的标签页滚动

时间:2019-05-27 06:06:12

标签: xaml listview xamarin scrollview

我创建了四个标签页1.当前2.即将发布3.已存档4.已取消 每个页面都包含listview。 1.current的onclick可以滚动列表,而其他选项卡的onclick则不能滚动

期望在ios中每个底部标签的click上滚动列表

我尝试了scrollTO方法

[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class TrainBookingPage : TabbedPage
{
    public TrainBookingPage()
    {
        InitializeComponent();
        var navCurrentBooking = new NavigationPage(new CurrentTrainBooking());
        navCurrentBooking.Title = "  Current";

        var navUpcommingBooking = new NavigationPage(new UpcommingTrainBooking());
        navUpcommingBooking.Title = "Upcomming";
        var navArchievedBooking = new NavigationPage(new ArchievedTrainBooking());
        navArchievedBooking.Title = "Archieved";
        var navCancelledBooking = new NavigationPage(new CancelledTrainBooking());
        navCancelledBooking.Title = "Cancelled";

        Children.Add(navCurrentBooking);
        Children.Add(navUpcommingBooking);
        Children.Add(navArchievedBooking);
        Children.Add(navCancelledBooking);

    }
}

0 个答案:

没有答案