private void stopDrawing() { var rect = captureZone.Rect; this.Hide(); var topLeftPx = ToDevicePixels(this, new System.Windows.Point(rect.X - 7, rect.Y - 7)); var heightWidthPx = ToDevicePixels(this, new System.Windows.Point(rect.Width, rect.Height)); _screenshot = Screenshot.CaptureDesktop((int)topLeftPx.X, (int)topLeftPx.Y, (int)heightWidthPx.X, (int)heightWidthPx.Y); if (_onCaptured != null) { _onCaptured(_screenshot); } }