mui icon indicating copy to clipboard operation
mui copied to clipboard

How do I navigate to a page programatically?

Open jauggy opened this issue 9 years ago • 3 comments

How do I navigate to a page programatically?

jauggy avatar Jun 11 '16 04:06 jauggy

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.

lechu90ns avatar Jul 09 '16 22:07 lechu90ns

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

CriticalCauchy avatar Jul 28 '16 14:07 CriticalCauchy

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.

Navigator.cs

UserControlExtensions.cs

prskr avatar Jul 31 '16 21:07 prskr