Keybinding and CommandParameter

Topics: Questions
Jul 24, 2014 at 8:10 AM
Hi

In the tabcontrol I use a Keybinding and using a Commandparameter to pase to the catel command.
        <TabControl.InputBindings>
            <KeyBinding Key="U"
                        Command="{Binding LoginCommand}"
                        Modifiers="Control" />
            <KeyBinding Key="N"
                        Command="{Binding LoginCommand}"
                        CommandParameter="0"
                        Modifiers="Control" />

            <KeyBinding Key="M"
                        Command="{Binding LoginCommand}"
                        CommandParameter="10"
                        Modifiers="Control" />
        </TabControl.InputBindings>
public Command<int?> LoginCommand { get; private set; }

LoginCommand = new Command<int?>(Login);


private void Login(int? level)
{
   if (level == null)
   {
        var vm = new UserLevelViewModel();
       _visualizerService.ShowDialog(vm);
     }
    else
    {
         _authenticationService.SetCurrentUserLevel((int) level);
      }
 }
level is always null. No parmeter is passed.

Do I something wrong?
Coordinator
Jul 24, 2014 at 11:10 AM
Looks ok, please provide a repro.
Jul 29, 2014 at 7:00 AM