I have a Silverlkight 4 application built with MVVM Light. I have various views with buttons on that are bound to commands in the viewmodels.
Everything works fine, when you click on a button, the command fires and whatever was called works.
All I want to change is instead of the user having to use to mouse to press the button to call the command I would like them to have the option of pressing return on the keyboard.
Simple I thought but at the moment I am stuck and cannot find any info of how to accomplish this. Any ideas please.
Thanks for the reply Vixen. I could see how this would work. I have already sorted it by using the code behind.
In the xaml I add a keydown event to the property of the control I was in which in my case was a grid but could be a listbox, textbox or whatever.
Then in the code behind I added
This worked for me