internal static void Navigate <T>(object args) where T : Page { T content = containerInstance.Resolve <T>(); (content.DataContext as INavigationAware)?.OnNavigatingTo(args); navWin.Navigate(content); }
protected override Window CreateShell() { containerInstance = this.Container; navWin = Resolve <MainWindowFactory>().Create(); navWin.Navigate(new LessonsOverviewView()); return(navWin); }
protected override void OnLoadCompleted(NavigationEventArgs e) { base.OnLoadCompleted(e); var navWin = new MetroNavigationWindow(); navWin.Title = @"WPF BikeShop"; navWin.Show(); navWin.Navigate(new MainMenu()); }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); var navWin = new MetroNavigationWindow(); navWin.Title = @"WPF BikeShop"; navWin.Show(); navWin.Navigate(new MainMenu()); }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); var navWin = new MetroNavigationWindow { Title = "Adventure Works Customer Service" }; navWin.Show(); navWin.Navigate(new MainMenu()); }
private void LaunchNavigationDemo(object sender, RoutedEventArgs e) { var navWin = new MetroNavigationWindow(); navWin.Title = "Navigation Demo"; //uncomment the next two lines if you want the clean style. //navWin.Resources.MergedDictionaries.Add(new ResourceDictionary() { Source = new Uri("pack://application:,,,/MahApps.Metro;component/Styles/Clean/CleanWindow.xaml", UriKind.Absolute) }); //navWin.SetResourceReference(StyleProperty, "CleanWindowStyleKey"); navWin.Show(); navWin.Navigate(new Navigation.HomePage()); }