static void OnCanExecute(object sender, CanExecuteRoutedEventArgs e) { SmartRoutedCommand cmd = e.Command as SmartRoutedCommand; if (cmd != null) { e.CanExecute = cmd.CanExecuteCore(e.Parameter); } }
static void OnExecuted(object sender, ExecutedRoutedEventArgs e) { SmartRoutedCommand cmd = e.Command as SmartRoutedCommand; if (cmd != null) { cmd.ExecuteCore(e.Parameter); e.Handled = true; } }