コード例 #1
0
        private static void TransferEvent(IInputElement newSource, ExecutedRoutedEventArgs e)
        {
            RoutedCommand command = e.Command as RoutedCommand;

            if (command != null)
            {
                try
                {
                    // SecurityCritical: Must not modify UserInitiated
                    command.ExecuteCore(e.Parameter, newSource, e.UserInitiated);
                }
                finally
                {
                    e.Handled = true;
                }
            }
        }
コード例 #2
0
 private static bool ExecuteCommand(RoutedCommand routedCommand, object parameter, IInputElement target, InputEventArgs inputEventArgs)
 {
     return(routedCommand.ExecuteCore(parameter, target, inputEventArgs.UserInitiated));
 }
コード例 #3
0
ファイル: CommandManager.cs プロジェクト: JianwenSun/cc
 private static bool ExecuteCommand(RoutedCommand routedCommand, object parameter, IInputElement target, InputEventArgs inputEventArgs)
 {
     return routedCommand.ExecuteCore(parameter, target, inputEventArgs.UserInitiated);
 }