using System.Collections.Generic;
using System.Linq;
using System.Windows.Input;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.GridView;

namespace CustomKeyboardCommandProvider_WPF
{
	public class CustomKeyboardCommandProvider : DefaultKeyboardCommandProvider
	{
		private GridViewDataControl parentGrid;
		private DefaultKeyboardCommandProvider defaultKeyboardProvider;
		private CustomKeyboardCommandProvider customKeyboardProvider;

		public CustomKeyboardCommandProvider(GridViewDataControl grid)
			: base(grid)
		{
			this.parentGrid = grid;
		}

		public override IEnumerable<ICommand> ProvideCommandsForKey(Key key)
		{
			List<ICommand> commandsToExecute = base.ProvideCommandsForKey(key).ToList();
			if (key == Key.Enter)
			{
				commandsToExecute.Remove(RadGridViewCommands.MoveDown);
			}
			return commandsToExecute;
		}
	}		
}
