# Getting back to game page from xaml page problem. (Windows Phone 8.1)

I have implemented a xaml page where user can submit his score. I have managed to get the user to the xaml page, after 2 hours of struggling but I do not know how can I navigate the user back to the game page, because I got nothing but black screen.

This is the code, I used to navigate to submit score xaml page:

var frame = new Frame();
frame.Navigate(typeof(SubmitScoreDialog));

Window.Current.Content = frame;
Window.Current.Activate();


I used the same code, to get the user back to game page, after he submited his score, but I get that black screen, nothing is drawn ... I do not know how can I get this working. Here is the code from SubmitScoreDialog.xaml.cs to get the user back to game page.

var frame = new Frame();
frame.Navigate(typeof(GamePage));

Window.Current.Content = frame;
Window.Current.Activate();


If anyone can provide me the working code for this problem, I will be very thankful.

• can't you just write the score to a file when the user cliks a "submit" button after the game ends ? why do you need to redirect the user to something else ? – dimitris93 Feb 20 '15 at 19:25
• Because I want to make a global leaderboard :P – Edvin Feb 20 '15 at 19:58
• so i write it in a database ? or write it somewhere programmatically, why does the user have to physically write it ? – dimitris93 Feb 20 '15 at 20:25
• Ok, and how can I write it programmatically, where? I forgot to mention but I am using App42 to store the scores, this I think is the best method to do it. Even though I don't use xaml page to submit I will need a xaml page to display the leaderboard.. – Edvin Feb 20 '15 at 21:25
• i don't know what xaml is. why don't you simply have a .txt or .xml in your dropbox/server, or a database in your server, and read/write that file (or database table) to display/save the game score in the screen ? database would been ideal, but a .txt/.xml on a remote server would have almost the same result (but much slower, less secure and more memory usage i suppose) – dimitris93 Feb 20 '15 at 21:28