Key gesture example does not work

Topics: Actions & Coroutines
Apr 2, 2012 at 3:39 PM
Edited Apr 2, 2012 at 3:40 PM

I found this workaround to get Main menu key gestures to work

http://www.felicepollano.com/2011/05/02/InputBindingKeyBindingWithCaliburnMicro.aspx

The comment in the CanExecute method is wrong, it still executes even if the Can property of the action method is false

 

        public bool CanExecute(object parameter)
        {
            // action is anyway blocked by Caliburn at the invoke level
            return true;
        }

 

The articles found about Caliburn and key gestures are pretty old, are there better ways of doing this these days?

Thansk

Apr 2, 2012 at 3:42 PM

Have you checked this solution?

Apr 3, 2012 at 8:03 AM

Thanks for reply. This is for WPF, the first example is for Silverlight, and your code doesn't seem to leverage CM?

Apr 3, 2012 at 9:23 AM

As far as I can remember, I tested the solution with both WPF and Silverlight with no issue... have you tried it yourself?

Apr 3, 2012 at 12:27 PM

Your code or cshepards? I tried cshepards, but it didnt compile under WPF and I didnt investigated any further. If i get it to build, how do I hook in the CreateTrigger?