Exemple #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            var window = new MainWindow();

            var viewNavigator = new ViewNavigator(window);

            var mainWindowViewModel = new MainWindowViewModel(viewNavigator);

            window.DataContext = mainWindowViewModel;

            Current.MainWindow = window;

            Current.MainWindow.Show();

            base.OnStartup(e);
        }
 public MainWindowViewModel(ViewNavigator viewNavigator)
 {
     _viewNavigator        = viewNavigator;
     GoToFirstViewCommand  = new RelayCommand(GoToFirstViewCommandHandler);
     GoToSecondViewCommand = new RelayCommand(GoToSecondViewCommandHandler);
 }