Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

OnAppearing() not working anymore

I don't know what else to mention besides this but OnAppearing isn't firing anymore. I am using TabbedPage but I was using TabbedPage before when OnAppearing was working as well.

Anyways here is what I am trying to achieve and maybe there may be another way to implement it.

The master page is a tabbed page containing Page C. Now Page C is an empty carousel page in which its OnAppearing() populates it like so:
Children.Add(new PersonPage()) //run 10 times so Page C is now a carousel page with 10 pages

So now what I am trying to do is when the user is on the 8th page (the 8th PersonPage) in the carousel page, add more pages to the carousel page so that the user does not reach the end of the carousel page. An infinite scrollable carousel page.

I basically added a flag to the 8th page and in the PersonPage() onAppearing(), checked whether the flag is set and then called:
parent.Children.Add(new PersonPage())

This was working but it isn't anymore. It seems to be because the PersonPage() OnAppearing() isn't firing anymore. I tested this by calling a DisplayAlert() which didn't show up.

Has anyone done anything similar?


  • robbitrobbit CNMember Xamurai

    Have you tried to put a break point on the method to check why it can't be fired?

  • apple999apple999 Member ✭✭

    No I haven't, I'll try to do that. Could you explain how a break point would help?

  • BrianSavageBrianSavage USMember ✭✭

    I have the same problem using a carousel. onAppearing() fires when the first page is displayed but not thereafter.

    Problem with Android and iOS

    This is a serious issue, I have a working app which also uses this which I cannot now now update.

    Anyone any ideas?

  • AndreiMisiukevich_AndreiMisiukevich_ USMember ✭✭✭✭✭

    Hi there
    CarouselPage is deprecated approach, i think.
    You can try with any type of CarouselView ( for example)

  • stanleybroostanleybroo USMember ✭✭

    Same problem OnAppearing() is not being hit anymore?
    Xamarin.Forms 3.1
    Android 8.1

    Any fix on this (pre-release?)

  • stanleybroostanleybroo USMember ✭✭
    edited August 2018
    I have a tabbedpage and the childrens onapearing is not hit anymore after update ro forms 3.1 and Oreo 8.1.
    Sometimes works, very strange behaviour behind the scenes :-)
  • apple999apple999 Member ✭✭

    yeah... Well my teammate made some breaking changes that caused this so I went back to my previous commit and continued from there... Maybe he had updated the packages like Stanleybroo did? Can't confirm sorry

  • stanleybroostanleybroo USMember ✭✭
    Yes, I rolled back to Xamarin.Forms (my stable before summer version for Oreo 8.0)

    ...Everything works as it should again.

    The only thing I had to move up was Android.Support.V4 to only 26.0.2 to be able to use "new" notifications

    Stable dev Environment again ;-)
Sign In or Register to comment.