I am currently using Modern UI from CodePlex. It is great and easy to use but there are some classes and events that I am not familiar with. Example: I have two GroupLinks n
For anyone that may be struggling with this, set this in your MainWindow.cs constructor:
Application.Current.MainWindow = this;
Then in the part of your application where you want to navigate to a page, run this:
IInputElement target = NavigationHelper.FindFrame("_top", Application.Current.MainWindow);
NavigationCommands.GoToPage.Execute("/NameOfYourPage.xaml", target);
You are mixing "page" navigation with "tab" navigation inside the ModernTab control.
If you call NavigationCommands.GoToPage.Execute
inside a ModernTab control you are changing the current "tab", not the current "page".
To change the top level page you can use:
IInputElement target = NavigationHelper.FindFrame("_top", this);
NavigationCommands.GoToPage.Execute("/Pages/BasicPage1.xaml", target);
If the new page is another ModernTab and you want to select a different tab then the default one, then you have to put in place some extra code. In example you could pass parameters to the new page. Se this SO answer.