Trying to switch screens when player dies in visual studio using xaml -


when player dies game exits want display mainmenu.xaml it's follows:

public void onplayerdeath(){      game.exit(); } 

what way make go main menu.xaml frame instead of game.exit?

create instance of mainmenu window , show it.

public void onplayerdeath() {     mainmenu mm = new mainmenu();     mm.show(); } 

Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -