I created a simple application in WPF and added one page. I also added one button to the main window, and when I click on it, it brings the page added. But now, I want to go back from the page to the main windows by using another button.
I tried to use:
MainMenu n = new MainMenu();
this.NavigationService.Navigate(n);
but I got this error:
Object reference not set to an instance of an object.
Any help?