none
Command Bubble up Issue

    Вопрос

  • Hi,

    I am working on an application where I have to create short cut for Adding a record. So I have created a command and then associated with command as below

     

     

    Add = new RoutedCommand("Add", typeof(ViewCommands));
    
    
    CommandManager.RegisterClassCommandBinding(typeof(PanelControl),
    
    new CommandBinding(FPSRecordViewCommands.Add, ViewCommands.ExecutedAddRecordCommand, CanExecuteAddCommand));
    
    
    Add.InputGestures.Add(new KeyGesture(Key.A, ModifierKeys.Control));
    
    
    

    The problem what I am facing is Ctrl + A has different meaning in text box. It has meaning to select text. So my Add command is not executing when focus is within text box. I appreciate if some one tell me how to handle this without subscribing to KeyUp or KeyDown of TextBox. I have some more short cuts which I want to override globally.

    Thanks

    Aj

    22 мая 2009 г. 7:45