public void OnMouseUp(object sender, MouseButtonEventArgs 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; OnMediaMouseUp?.Invoke(this, x, y); }
public void OnMouseUp(object sender, MouseButtonEventArgs 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; OnMediaMouseUp?.Invoke(this, x, y); } }