コード例 #1
0
 /// <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);
 }
コード例 #2
0
 /// <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);
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of <see cref="ViewModelWithNavigationCommands"/>.
 /// </summary>
 /// <param name="source">The source view model.</param>
 public ViewModelWithNavigationCommands(IRedirectViewModel source)
 {
     _source = source;
 }