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();

Window.Current.Content = frame;

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();

Window.Current.Content = frame;

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

  • \$\begingroup\$ 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 ? \$\endgroup\$ – dimitris93 Feb 20 '15 at 19:25
  • \$\begingroup\$ Because I want to make a global leaderboard :P \$\endgroup\$ – Edvin Feb 20 '15 at 19:58
  • \$\begingroup\$ so i write it in a database ? or write it somewhere programmatically, why does the user have to physically write it ? \$\endgroup\$ – dimitris93 Feb 20 '15 at 20:25
  • \$\begingroup\$ 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.. \$\endgroup\$ – Edvin Feb 20 '15 at 21:25
  • \$\begingroup\$ 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) \$\endgroup\$ – dimitris93 Feb 20 '15 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.