Example #1
0
        private TriggerBase<FrameworkElement> ConstructTrigger()
        {
            var trigger = new InputBindingTrigger();

            trigger.GlobalInputBindings.Add(new KeyBinding { Modifiers = Modifiers, Key = Key });

            var command = new ActionMessageCommand { MethodName = Name };
            Command = command;
            trigger.Actions.Add(command);

            return trigger;
        }
Example #2
0
        private TriggerBase <FrameworkElement> ConstructTrigger()
        {
            var trigger = new InputBindingTrigger();

            trigger.GlobalInputBindings.Add(new KeyBinding {
                Modifiers = Modifiers, Key = Key
            });

            var command = new ActionMessageCommand {
                MethodName = Name
            };

            Command = command;
            trigger.Actions.Add(command);

            return(trigger);
        }