Interaction logic for VideoWPF.xaml
Inheritance: System.Windows.Controls.UserControl
Ejemplo n.º 1
0
        private void AddWPFControl()
        {
            if (this.wpfVideo == null)
            {
                this.wpfVideo = new VideoWPF();
            }

            if (this.wpfElementhost == null)
            {
                this.wpfElementhost       = new ElementHostEx();
                this.wpfElementhost.Dock  = DockStyle.Fill;
                this.wpfElementhost.Child = this.wpfVideo;

                //ElementHost.EnableModelessKeyboardInterop(this.wpfVideo);
                this.wpfElementhost.DoubleClick += new EventHandler(wpfElementhost_DoubleClick);
                wpfVideo.KeyDown   += new System.Windows.Input.KeyEventHandler(wpfVideo_KeyDown);
                wpfVideo.MouseDown += new System.Windows.Input.MouseButtonEventHandler(wpfVideo_MouseDown);
            }

            this.Controls.Add(this.wpfElementhost);
        }
Ejemplo n.º 2
0
        private void AddWPFControl()
        {
            if (this.wpfVideo == null)
                this.wpfVideo = new VideoWPF();

            if (this.wpfElementhost == null)
            {
                this.wpfElementhost = new ElementHostEx();
                this.wpfElementhost.Dock = DockStyle.Fill;
                this.wpfElementhost.Child = this.wpfVideo;

                //ElementHost.EnableModelessKeyboardInterop(this.wpfVideo);
                this.wpfElementhost.DoubleClick += new EventHandler(wpfElementhost_DoubleClick);
                wpfVideo.KeyDown += new System.Windows.Input.KeyEventHandler(wpfVideo_KeyDown);
                wpfVideo.MouseDown += new System.Windows.Input.MouseButtonEventHandler(wpfVideo_MouseDown);
            }

            this.Controls.Add(this.wpfElementhost);
        }