View key binding

Feb 11, 2016 at 9:29 PM
How do you do key binding with mvvm view?
<c:View.InputBindings>
   <KeyBinding Key="W" Modifiers="Control" Command="{Binding CloseWindows}" />
</c:View.InputBindings>
the above code work. How do I do keybinding with view that is derived from the code framework? For example:
<mvvm:View xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:mvvm="clr-namespace:CODE.Framework.Wpf.Mvvm;assembly=CODE.Framework.Wpf.Mvvm"
           xmlns:Controls="clr-namespace:CODE.Framework.Wpf.Controls;assembly=CODE.Framework.Wpf"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:Layout="clr-namespace:CODE.Framework.Wpf.Layout;assembly=CODE.Framework.Wpf"
           Title=""           
           Style="{DynamicResource CODE.Framework-Layout-ListPrimarySecondaryFormLayout}">
Coordinator
Jul 25, 2016 at 10:29 PM
Hello! Sorry about the late reply. Somehow Codeplex is not notifying me of new messages anymore, so I missed this.

You basically always bind the keys the same way no matter what object you use. So something like this will work:
<mvvm:View xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:mvvm="clr-namespace:CODE.Framework.Wpf.Mvvm;assembly=CODE.Framework.Wpf.Mvvm"
           xmlns:Controls="clr-namespace:CODE.Framework.Wpf.Controls;assembly=CODE.Framework.Wpf"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:Layout="clr-namespace:CODE.Framework.Wpf.Layout;assembly=CODE.Framework.Wpf"
           Title=""           
           Style="{DynamicResource CODE.Framework-Layout-ListPrimarySecondaryFormLayout}">
    <mvvm:View.InputBindings>
       <KeyBinding Key="W" Modifiers="Control" Command="{Binding CloseWindows}" />
    </cmvvmView.InputBindings>
Markus