Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public MainWindowViewModel(ViewNavigator viewNavigator)
 {
     _viewNavigator        = viewNavigator;
     GoToFirstViewCommand  = new RelayCommand(GoToFirstViewCommandHandler);
     GoToSecondViewCommand = new RelayCommand(GoToSecondViewCommandHandler);
 }