I\'m trying to build my first Windows 8 Metro App using VS 2012 & C#.
It consists of a simple 2 pages layout, the first being the presentation & setup page and t
You can pass parameter object in Frame
's Navigate(...) method. So you should write like this.
MainPage.xaml.cs
Player p = new Player();
this.Frame.Navigate(typeof(MainGame), p);
Now that object of Player
can be get in MainGame.xaml.cs
's OnNavigatedTo(...)
method.
MainGame.xaml.cs
protected override void OnNavigatedTo(NavigationEventArgs e)
{
var objPlayer = e.Parameter as Player;
}