How do I navigate to a page programatically?
How do I navigate to a page programatically?
I believe you would need to see how BBCode is working and I am sure you would find an answer there. I am not able to get a working code for you but you can check OnRequestNavigate(object sender, RequestNavigateEventArgs e) method in \mui-master\1.0\FirstFloor.ModernUI\Shared\Windows\Controls\BBCodeBlock.cs file.
System.Windows.IInputElement target = FirstFloor.ModernUI.Windows.Navigation.NavigationHelper.FindFrame( "_top", System.Windows.Application.Current.MainWindow); System.Windows.Input.NavigationCommands.GoToPage.Execute("/Pages/Testpage.xaml", target);
I attached 2 links to a project I'm working on with MUI and a programmatic navigation. I'm replacing the content of the content frame of the MainWindow by instances of views created by Autofac for dependency injection but with this approach the navigation bar doesn't recognize the change of the view. If you want the navigation bar recognize the view change you have to change the Source property of the ModernFrame in the MainWindow like CriticalCauchy discribed it.