/// <summary> /// Initializes a new instance of the <see cref="RedoCommandBinding<TController, TModel>"/> class. /// </summary> /// <param name="viewModel">The view model.</param> public RedoCommandBinding(ViewModel <TController, TModel> viewModel) { this.Command = ApplicationCommands.Redo; this.CanExecute += delegate(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = RedoCommand <TController, TModel> .CanExecute(viewModel, e.Parameter); }; this.Executed += delegate(object sender, ExecutedRoutedEventArgs e) { RedoCommand <TController, TModel> .Execute(viewModel, e.Parameter); }; }
internal static void Execute(ViewModel <TController, TModel> viewModel, object parameter) { RedoCommand <TController, TModel> .Redo(viewModel); }
internal static bool CanExecute(ViewModel <TController, TModel> viewModel, object parameter) { return(RedoCommand <TController, TModel> .CanRedo(viewModel)); }