0

Dead simple question, but I'm new so give me a break.

Windows Phone 7. Click on a button and I want to redirect to a new xaml in the code behind.

How do I do it?

Thanks

mat-mcloughlin
  • 6,492
  • 12
  • 45
  • 62

1 Answers1

2

You'll want to do something like this:

NavigationService.Navigate(new Uri("/Page2.xaml", UriKind.Relative));

If you create a new Databound application you'll see a similar thing which also includes an example of passing data to the other page.

If you're new to the platform you may also benefit from having a look at the answers at Want to start with Windows Phone 7 development

BTW. It's Windows PHONE 7, not Windows Mobile.

Community
  • 1
  • 1
Matt Lacey
  • 65,560
  • 11
  • 91
  • 143