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?
In the application manifest, change the start page to the desired page.
. , , . . Go Project > a > WMAppManifest.xml. Application UI > Navigation .
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
App.xaml Application_Launching - :
Application_Launching
App.RootFrame.Navigate(new Uri("/Startup.xaml",UriKind.Relative));
, "Startup.xaml" xaml.
Windows Phone, #: