OnAppearing event only called once

Hello,
I'm new to xamarin. I wonder why my OnAppearing event (detail page in master detail apps) only called once (during first appearance only)

    protected override void OnAppearing()
    {
        base.OnAppearing();
    do_something();
    }

It doesn't get called again even after the user clicked the drawer icon, master page pop over (and cover the detail page), click menu in the master page, detail page appear again. I expect it to be called on every appearing. Am I missing something here ?. Is it possible to have those behaviour in xamarin and how ?

Thanks in advance for your help

Tagged:

Answers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Does it really appear again? I don't think it does. The master flies out over it as you said. Then the master retreats. But the page remains throughout all that, right?

    If you go to a totally different page - then back to the first page - then you get the OnAppearing event, right?

  • sholikhinsholikhin Member ✭✭

    @ClintStLaurent said:
    Does it really appear again? I don't think it does. The master flies out over it as you said. Then the master retreats. But the page remains throughout all that, right?

    Right. Any idea on how to make as if it were disappearing on drawer click ?

    If you go to a totally different page - then back to the first page - then you get the OnAppearing event, right?

    I'll try this too.

    Thanks

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @sholikhin said:
    Right. Any idea on how to make as if it were disappearing on drawer click ?

    Well... There isn't really a 'none' to pages. So maybe make a default/dummy/blank page. That way you can go to that blank page when the menu us picked. Therefore its always a change in pages when the user picks a page from the menu, even if it's a change from A to A, because the blank page was forced in between.

Sign In or Register to comment.