Results 1 to 4 of 4

Thread: [RESOLVED] Navigate to new page in an XBAP

  1. #1

    Thread Starter
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    Resolved [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?
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    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:
    1. 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
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3

    Thread Starter
    Frenzied Member obi1kenobi's Avatar
    Join Date
    Aug 2007
    Posts
    1,091

    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
    Please rate helpful ppl's posts. It's the best 'thank you' you can give

  4. #4
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    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
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width