private void pictureBox1_MouseWheel(object sender, MouseEventArgs e) { if (Command != null && Command.MouseWheel(e)) { pictureBox1.Invalidate(); } else { float s = 1.2f; if (e.Delta < 0) { s = 0.8f; } ViewPort.ScaleAt(e.Location.X, e.Location.Y, s); pictureBox1.Invalidate(); } }