Hi Mariano, thanks for help.
Generally the concept is right, but there is one thing missing: Command property cannot be asigned-to with value {Binding ACommand}. Some kind of wrapper is required.
<UserControl.Resources>
<!-- this time Command property _is_ a dependency property
<mvvmUtils:CommandReference x:Key="searchCommandRef"Command={Binding ACommand} />
</UserControl.Resources>
...
...
<TextBox Text="{Binding SearchPhrase}"> <TextBox.InputBindings> <KeyBinding Command="{StaticResource searchCommandRef}" Key="Enter"/> </TextBox.InputBindings> </TextBox>
A sample CommandReference class can be found here:
http://cid-890c06c8106550a0.skydrive.live.com/self.aspx/BlogSamples/JoyfulWPF/MvvmCommandRederence.zipAnd The article that explains that all again:
http://joyfulwpf.blogspot.com/2009/05/mvvm-commandreference-and-keybinding.htmlThanks again,
Michal