static void SafeExecute( this ICommand command, MouseState state, object parameter )
		{
			var args = new MouseCommandArgs { MouseState = state, Parameter = parameter };
			if ( command != null && command.CanExecute( args ) )
			{
				command.Execute( args );
			}
		}
示例#2
0
        static void SafeExecute(this ICommand command, MouseState state, object parameter)
        {
            var args = new MouseCommandArgs {
                MouseState = state, Parameter = parameter
            };

            if (command != null && command.CanExecute(args))
            {
                command.Execute(args);
            }
        }