コード例 #1
0
 public void Execute(object parameter)
 {
     if (parameter is ViewType viewType)
     {
         _navigator.CurrentViewModel = _rootViewModelFactory.CreateViewModel(viewType);
     }
 }
コード例 #2
0
        public void Execute(object parameter)
        {
            if (parameter is ViewType)
            {
                var viewType = (ViewType)parameter;

                _navigator.CurrentViewModel = _viewModelFactory.CreateViewModel(viewType);
            }
        }
コード例 #3
0
        // Constructors
        #region Constructors

        public ShellViewModel(INavigator navigator, IRootViewModelFactory viewModelFactory)
        {
            _navigator = navigator;
            _navigator.StateChanged    += Navigator_StateChanged;
            _navigator.CurrentViewModel = viewModelFactory.CreateViewModel(ViewType.Home);

            UpdateCurrentViewModelCommand = new UpdateCurrentViewModelCommand(_navigator, viewModelFactory);

            CloseApplicationCommand = new RelayCommand(CloseApplication);
        }