Question

I would like to add keyboard shortcut in an desktop app using Caliburn Micro in the way described in here. But I totally have no idea how to override the parser. Should I attach the class ShortcutParser in the class Parse in Caliburn Micro, and place the following code somewhere?

var currentParser = Parser.CreateTrigger;
Parser.CreateTrigger = (target, triggerText) => ShortcutParser.CanParse(triggerText)
                                                ? ShortcutParser.CreateTrigger(triggerText)
                                                : currentParser(target, triggerText);

I posted a comment to seek help from the author, but no response. Please help me out. Thanks a lot.

Was it helpful?

Solution

This was something that a couple of guys came up with on the older forums.

https://archive.codeplex.com/?p=caliburnmicro discussions look for #id 243905 or search for KeyTrigger convention on the discussions tab..

as the comment suggests post is indeed dead but the code and archive still carry the results..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top