/// <summary> /// Initializes a new instance of <see cref="NavigateToCommand"/>. /// </summary> /// <param name="source">The source view model.</param> /// <param name="viewModel">The view model to navigate.</param> public NavigateToCommand(IRedirectViewModel source, object viewModel) { _source = source; _viewmodel = viewModel; handler = new RelayCommand(Execute, CanExecute); }
/// <summary> /// Initializes a new instance of <see cref="GoBackCommand"/>. /// </summary> /// <param name="source">The view model.</param> /// <param name="steps">The number of steps in navigation stack.</param> public GoBackCommand(IRedirectViewModel source, int steps = 1) { _source = source; _steps = steps; handler = new RelayCommand(Execute, CanExecute); }
/// <summary> /// Initializes a new instance of <see cref="ViewModelWithNavigationCommands"/>. /// </summary> /// <param name="source">The source view model.</param> public ViewModelWithNavigationCommands(IRedirectViewModel source) { _source = source; }