Esempio n. 1
0
        public void OnMouseMove(object sender, MouseEventArgs e)
        {
            Point  p           = e.GetPosition(VideoImage);
            double pixelWidth  = VideoImage.Source.Width;
            double pixelHeight = VideoImage.Source.Height;
            double x           = pixelWidth * p.X / VideoImage.ActualWidth;
            double y           = pixelHeight * p.Y / VideoImage.ActualHeight;

            OnMediaMouseMove?.Invoke(this, x, y);
        }
Esempio n. 2
0
        public void OnMouseMove(object sender, MouseEventArgs e)
        {
            if (this.HasVideo)
            {
                Point  p           = e.GetPosition(this);
                double pixelWidth  = this.Width;
                double pixelHeight = this.Height;
                double x           = pixelWidth * p.X / this.ActualWidth;
                double y           = pixelHeight * p.Y / this.ActualHeight;

                OnMediaMouseMove?.Invoke(this, x, y);
            }
        }