Пример #1
0
 public void Add(string command, Action <RoutedEventArgs> action)
 {
     Bindings.Add(new CommandBinding(CommandExtension.CommandForString(command), (sender, e) => action(e)));
 }
Пример #2
0
 public void Add(string command, Action <RoutedEventArgs> action, Func <RoutedEventArgs, bool> func)
 {
     Bindings.Add(new CommandBinding(CommandExtension.CommandForString(command), (sender, e) => action(e), (sender, e) => e.CanExecute = func(e)));
 }