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); }
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); }