示例#1
0
        internal static void Navigate <T>(object args) where T : Page
        {
            T content = containerInstance.Resolve <T>();

            (content.DataContext as INavigationAware)?.OnNavigatingTo(args);
            navWin.Navigate(content);
        }
示例#2
0
        protected override Window CreateShell()
        {
            containerInstance = this.Container;

            navWin = Resolve <MainWindowFactory>().Create();
            navWin.Navigate(new LessonsOverviewView());
            return(navWin);
        }
示例#3
0
        protected override void OnLoadCompleted(NavigationEventArgs e)
        {
            base.OnLoadCompleted(e);
            var navWin = new MetroNavigationWindow();

            navWin.Title = @"WPF BikeShop";
            navWin.Show();
            navWin.Navigate(new MainMenu());
        }
示例#4
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            var navWin = new MetroNavigationWindow();

            navWin.Title = @"WPF BikeShop";
            navWin.Show();
            navWin.Navigate(new MainMenu());
        }
示例#5
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            var navWin = new MetroNavigationWindow
            {
                Title = "Adventure Works Customer Service"
            };

            navWin.Show();
            navWin.Navigate(new MainMenu());
        }
示例#6
0
        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());
        }