Exemplo n.º 1
0
        static public void Initilize(AvaloniaEngine engine)
        {
            engine.AddSimpleInstancer <KeyBinding>();
            engine.AddAvaloniaPropertyAttributeLinksForType <KeyBinding>();
            engine.AddFunctionInfo <KeyBinding>("action", (b, s) => b.Command = s.GetCommand());

            engine.AddSimpleConstructor <KeyGesture, string, string>("KeyGesture",
                                                                     (k, m) => new KeyGesture(k.ConvertEX <Key>(), m.ConvertEX <KeyModifiers>())
                                                                     );

            engine.AddDynamicChildrenInfo <Control>("key_bindings", e => e.KeyBindings);
        }