Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

how to hide the navigation controller back button and create the left barbutton and rightbarbutton

$
0
0

hi,

i want to hide the navigation back bar button its not working i mentioned my code below :

    this.NavigationItem.HidesBackButton = true;

        this.NavigationItem.SetRightBarButtonItem(
            new UIBarButtonItem(UIBarButtonSystemItem.Save, (sender,args) => 
                {

                    Console.WriteLine("clicking save");
                    // button was clicked
                } )
            , true);

        this.NavigationItem.SetLeftBarButtonItem(new UIBarButtonItem(UIBarButtonSystemItem.Cancel,(sender,EventArgs)=>
            {
                Console.WriteLine("button was clicked");
                this.NavigationController.PopViewControllerAnimated(true);
            } )
            ,true);

this code is not working back button is not hiding.pl anybody suggest me how to do this.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>