disabling back button on logout

AishwaryaAishwarya Member ✭✭

hey,
I have a logout button, wen clicked , it navigates to login page but has back button on top which leads the user back to app,

how to disable it?

Best Answer

Answers

  • seanydaseanyda GBMember ✭✭✭✭✭

    Add this to the ContentPage:
    NavigationPage.SetHasBackButton(this, false);

  • AishwaryaAishwarya Member ✭✭

    @mohamed_dawood Thanks !!! #worked

  • mohamed_dawoodmohamed_dawood Member ✭✭

    @aishwarya you are welcome and thanks

  • softtopsofttop Member

    @seanyda said:
    Add this to the ContentPage:
    NavigationPage.SetHasBackButton(this, false);

    This work for me! Thanks

  • sina_saboohisina_saboohi Member ✭✭
    edited July 7

    _ //The code below this should disable it_
    ** public override void OnBackPressed ()
    {
    base.OnBackPressed ();
    }**
    _ //The code above this should disable it
    _

Sign In or Register to comment.