Key gesture example does not work

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

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

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?


Apr 2, 2012 at 2:42 PM

Have you checked this solution?

Apr 3, 2012 at 7: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 8: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 11:27 AM

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?