this.BindCommand(ViewModel, x => x.SearchCommand, x => x.searchButton);
TextBoxSearch.KeyUp += delegate(object sender, KeyEventArgs args)
{
if (args.Key == Key.Enter)
{
ViewModel.SearchCommand.Execute(null);
}
};
I got this far, but couldn't figure out to make it work for just the Enter key.
this.BindCommand(ViewModel, x => x.SearchCommand, x => x.TextBoxSearch, "KeyUp");