Interaction logic for VideoWPF.xaml
Inheritance: System.Windows.Controls.UserControl
コード例 #1
0
ファイル: VideoControl.cs プロジェクト: zhiqiang-li/CodeTV
        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);
        }
コード例 #2
0
ファイル: VideoControl.cs プロジェクト: dgis/CodeTV
        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);
        }