Esempio n. 1
0
        static public void Initilize(WPFEngine engine)
        {
            engine.AddGeneralModifier <FrameworkElement>((ex, e) => e.DataContext = ex.GetTargetInfo().GetTarget());

            engine.AddAttributeValue <FrameworkElement, bool>("auto_focus", (f, v) => v.IfTrue(() => f.Focus()));

            engine.AddAttributeFunction <FrameworkElement>("bind_left_click", (f, a) => f.AddInputBinding(a, MouseAction.LeftClick));
            engine.AddAttributeFunction <FrameworkElement>("bind_left_double_click", (f, a) => f.AddInputBinding(a, MouseAction.LeftDoubleClick));
        }