private void viewBox_MouseDown(object sender, MouseButtonEventArgs e) { Point pos = e.GetPosition(theImage); Psf = PSF.FromBitmap(Picture.Image, new System.Drawing.Point((int)pos.X, (int)pos.Y)); imgPsfPreview.Source = ToBitmap(Psf.ToRawImage()); }