private static void HandleExecute(object sender, RoutedEventArgs e) { ExecutedRoutedEventArgs args = (ExecutedRoutedEventArgs)e; CommandToMessenger.Execute(args.Source, args); }
private static void HandlePreviewCanExecute(object sender, RoutedEventArgs e) { CanExecuteRoutedEventArgs args = (CanExecuteRoutedEventArgs)e; CommandToMessenger.PreviewCanExecute(args.Source, args); }
public static void BindToMessenger(this MenuItem item, RoutedCommand command) { item.Command = CommandToMessenger.Bind(item, command); }