Ejemplo n.º 1
0
        public FrameworkElementContainer(FrameworkElement control)
        {
            Control = control;

            Resize = new DelegatedEventEmitter(
                value => { Control.SizeChanged += (sender, args) => value(); },
                value => { }
                );

            MouseDown = new DelegatedEventEmitter <IMouseEventArgs>(
                value =>
            {
                Control.MouseDown += (sender, args) => value(new WpfMouseEventArgs(args));
            },
                value => { }
                );

            MouseMove = new DelegatedEventEmitter <IMouseEventArgs>(
                value =>
            {
                Control.MouseMove += (sender, args) => value(new WpfMouseEventArgs(args));
            },
                value => { }
                );

            MouseUp = new DelegatedEventEmitter <IMouseEventArgs>(
                value =>
            {
                Control.MouseUp += (sender, args) => value(new WpfMouseEventArgs(args));
            },
                value => { }
                );
        }
        public ControlContainer(Control control)
        {
            Control = control;

            Resize = new DelegatedEventEmitter(
                value => { Control.Resize += (sender, args) => value(); },
                value => { }
                );

            MouseDown = new DelegatedEventEmitter <IMouseEventArgs>(
                value =>
            {
                Control.MouseDown += (sender, args) => value(new WinFormsMouseEventArgs(Control, args));
            },
                value => { }
                );

            MouseMove = new DelegatedEventEmitter <IMouseEventArgs>(
                value =>
            {
                Control.MouseMove += (sender, args) => value(new WinFormsMouseEventArgs(Control, args));
            },
                value => { }
                );

            MouseUp = new DelegatedEventEmitter <IMouseEventArgs>(
                value =>
            {
                Control.MouseUp += (sender, args) => value(new WinFormsMouseEventArgs(Control, args));
            },
                value => { }
                );
        }