Example #1
0
        private static void HandleExecute(object sender, RoutedEventArgs e)
        {
            ExecutedRoutedEventArgs args = (ExecutedRoutedEventArgs)e;

            CommandToMessenger.Execute(args.Source, args);
        }
Example #2
0
        private static void HandlePreviewCanExecute(object sender, RoutedEventArgs e)
        {
            CanExecuteRoutedEventArgs args = (CanExecuteRoutedEventArgs)e;

            CommandToMessenger.PreviewCanExecute(args.Source, args);
        }
Example #3
0
 public static void BindToMessenger(this MenuItem item, RoutedCommand command)
 {
     item.Command = CommandToMessenger.Bind(item, command);
 }