How to change the start page?

When developing my application for Windows Phone 8, I often want to launch right on the page I'm working on. This is not always the main page. The article found here talks about an application with an OnLaunched event handler. I think this is no longer there (maybe I just don't see it). Is there a more modern way to customize the page where the solution is launched first?

+5
source share
5 answers

In the application manifest, change the start page to the desired page.

+16
source

. , , . . Go Project > a > WMAppManifest.xml. Application UI > Navigation .

+4

Windows:

> App.xaml.cs

protected override void OnLaunched(LaunchActivatedEventArgs e)
{
    /*...*/
        if (rootFrame.Content == null)
        {
          /*...*/

            // When the navigation stack isn't restored navigate to the first page,
            // configuring the new page by passing required information as a navigation
            // parameter
            if (!rootFrame.Navigate(typeof(MainPage), e.Arguments))
            {
                throw new Exception("Failed to create initial page");
            }
        }
     /*...*/
}

MainPage

+3

App.xaml Application_Launching - :

App.RootFrame.Navigate(new Uri("/Startup.xaml",UriKind.Relative));

, "Startup.xaml" xaml.

+1

Windows Phone, #:

  • WMAppManifest.xml.
  • " " MainPage.xaml YourPageName.xaml( YourPageName xaml, ).
+1

All Articles