[RESOLVED] Navigate to new page in an XBAP
I'm working on an XBAP at the moment which consists of two pages - a welcome screen and the main screen. The main screen is currently set as the startup URI. Unfortunately, I cannot find a way to display the welcome screen before the main screen is shown, I even can't find a way to display a page different than the startup URI :( MSDN wasn't very helpful either... Can someone help?
Re: Navigate to new page in an XBAP
You can use the Navigate method of the NavigationService class, so for example you could have this in your first page:
vb Code:
Me.NavigationService.Navigate(New Uri("Page2.xaml", UriKind.Relative))
There's different ways to use the navigate method though, you dont have to supply a URI, you can supply an actual instance of an object but there are pros and cons to each way of doing it. Just do a bit of reading up on WPF NavigationService and play around with it and I'm sure you will get the hang of it :)
Re: Navigate to new page in an XBAP
There is such a thing as Me.NavigationService?? :S I found the NavigationService class but I didn't know I could call it like that... This is my first XBAP after all...
Thanks :)
Re: [RESOLVED] Navigate to new page in an XBAP
No worries :) I've never made an XBAP, but I've worked with Pages in WPF before (You can use Pages in normal WPF apps inside a Frame) so thats how I knew :)