Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RedoCommandBinding&lt;TController, TModel&gt;"/> 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);
            };
        }
Esempio n. 2
0
 internal static void Execute(ViewModel <TController, TModel> viewModel, object parameter)
 {
     RedoCommand <TController, TModel> .Redo(viewModel);
 }
Esempio n. 3
0
 internal static bool CanExecute(ViewModel <TController, TModel> viewModel, object parameter)
 {
     return(RedoCommand <TController, TModel> .CanRedo(viewModel));
 }