locked
How to change start page

    Question

  • Hello,

    I'm creating a C++ Directx and XAML Universal App. How could I change the startpage?
    Thanks!
    Tuesday, February 10, 2015 8:31 AM

Answers

  • Change this line of code in App.xaml.cpp in the Shared project:

    if (!rootFrame->Navigate(MainPage::typeid, e->Arguments))

    Change MainPage to the name of the page that you want to start with.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by Barna G Tuesday, February 10, 2015 9:09 PM
    Tuesday, February 10, 2015 1:24 PM
    Moderator

All replies

  • Change this line of code in App.xaml.cpp in the Shared project:

    if (!rootFrame->Navigate(MainPage::typeid, e->Arguments))

    Change MainPage to the name of the page that you want to start with.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by Barna G Tuesday, February 10, 2015 9:09 PM
    Tuesday, February 10, 2015 1:24 PM
    Moderator
  • Thank You! Next time I'll post the code too.
    Tuesday, February 10, 2015 9:11 PM