Changing navigation bar title when inside a tabbed page.

JacksonChenJacksonChen USMember ✭✭

Hi, I am a xamarin.forms beginner, just wondering how can I change navigation bar's title when its in tabbed page? code as following :

public TabbedPageDemoPage() { Children.Add(new PageA() { Title = "PageA_tabbutton_text", Icon = "pageA_icon.png" }); Children.Add(new PageB() { Title = "PageB_tabbutton_text", Icon = "pageB_icon.png" }); Children.Add(new PageC() { Title = "PageC_tabbutton_text", Icon = "pageC_icon.png" }); Title = "Navigation Title"; // <---- I want change bar title when I tabbed pageA tab button so title become : "Page A Title" }

many thanks indeed.

regards,

Tagged:

Best Answer

Answers

  • JacksonChenJacksonChen USMember ✭✭
    edited July 2016

    @Keen On Apps : Works like charm! Thank you for you wonderful answer!

  • bujjiiibujjiii INMember ✭✭

    hii guys
    how to set tabbedpage title to titlecase" in xamarin crossplatform"

    thanks
    dhana

  • BaqerNaqviBaqerNaqvi USMember ✭✭

    In your TabbedPage, bind an event
    this.CurrentPageChanged += CurrentPageHasChanged;
    and then in that function
    protected void CurrentPageHasChanged(object sender, EventArgs e){
    this.Title = this.CurrentPage.Title;
    }

  • PriyanKaAgRawaLPriyanKaAgRawaL Member ✭✭

    Hi,
    I need to set Tabbed Page title different from NavigationBar title, How I can change only Navigationbar title.
    Thank you

Sign In or Register to comment.