Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm still new with the Windows Phone development. So now I'm going to develop the Windwos Phone 8.1. I really no idea what's the problem with the page navigation. I wrote the code like this

private void hbGo_Click(object sender, RoutedEventArgs e)
{
    this.Frame.Navigate(typeof(SecondPage));
}

but it shows me the error (This page does not contain a definition for "Frame" and no extension method "Frame" accepting the first arguments) even i put like the code of bottom also the same...

Frame.Navigate(typeof(SecondPage));
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
211 views
Welcome To Ask or Share your Answers For Others

1 Answer

The Navigation depends on the kind of your project:

If it is Windows Phone 8.1 Silverlight then you should use NavigationService.Navigate() method:

Applies to: Windows Phone 8 and Windows Phone Silverlight 8.1 | Windows Phone OS 7.1

If you are targeting Windows Phone RunTime then you should use Frame.Navigate method():

Minimum supported phone Windows Phone 8.1 [Windows Runtime apps only]


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...