Forum Xamarin.Forms

how to change the current page in xamarin.forms shell?

lescperlescper Member ✭✭✭✭✭

my shell section is


<ShellContent Title="IndexPage" Icon="tab_about.png" ContentTemplate={DataTemplate local:IndexPage}"/>

when I open the APP the current page is IndexPage

but I changed the ShellContent Title and Template

but the current page not changed how to change it without a tap or click?

Tagged:

Best Answer

  • LeonLuLeonLu Member, Xamarin Team Xamurai
    Accepted Answer

    You can change the Title when you are showing current page .

    However, if you want to change the ContentTemplate, the appropriate way to use await Shell.Current.GoToAsync("Page2"); to navigate to new page. If you replace the running page, it will not work.


    Xamarin forums are migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
    For more information, please refer to this sticky post.

Answers

  • LeonLuLeonLu Member, Xamarin Team Xamurai
    Accepted Answer

    You can change the Title when you are showing current page .

    However, if you want to change the ContentTemplate, the appropriate way to use await Shell.Current.GoToAsync("Page2"); to navigate to new page. If you replace the running page, it will not work.


    Xamarin forums are migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
    For more information, please refer to this sticky post.

  • LeonLuLeonLu Member, Xamarin Team Xamurai

    Are there any update for this issue, please reply is helpful, please click the Yes tab under the helpful answer.


    Xamarin forums are migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
    For more information, please refer to this sticky post.

Sign In or Register to comment.