// Constructors #region Constructors public ShellViewModel(INavigator navigator, IRootViewModelFactory rootViewModelFactory) { _navigator = navigator; _navigator.StateChanged += Navigator_StateChanged; ChangeCurrentViewModelCommand = new ChangeCurrentViewModelCommand(rootViewModelFactory, _navigator); ChangeCurrentViewModelCommand.Execute(ViewType.Tables); }
public Main(IRootViewModelFactory viewModelFactory) { DataContext = viewModelFactory.CreateMainViewModel(); ViewStateManager = new ViewStateManager(viewModelFactory); CurrentPage = ViewStateManager.Navigator.CurrentBody; InitializeComponent(); }
public ViewStateManager(IRootViewModelFactory viewModelFactory) { _viewModelFactory = viewModelFactory; Navigator = new Navigator(new ObservableCollection <INavigatorItem>() { new Login(viewModelFactory.CreateLoginViewModel()) }); Navigator.CurrentBody = Navigator.Bodies[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); }
public UpdateCurrentViewModelCommand(INavigator navigator, IRootViewModelFactory viewModelFactory) { _navigator = navigator; _viewModelFactory = viewModelFactory; }
public Navigator(IRootViewModelFactory viewModelFactory) { UpdateCurrentViewModelCommand = new UpdateCurrentViewModelCommand(this, viewModelFactory); }
public ChangeCurrentViewModelCommand(IRootViewModelFactory rootViewModelFactory, INavigator navigator) { _rootViewModelFactory = rootViewModelFactory; _navigator = navigator; }