public void DisplayOpenFilePreview() { try { if (pictureEdit == null) { pictureEdit = new PictureEdit(); pictureEdit.Dock = DockStyle.Bottom; pictureEdit.Properties.SizeMode = PictureSizeMode.StretchVertical; PopupControl.Controls.Add(pictureEdit); } pictureEdit.Image = Image.FromFile(this.OwnerEdit.GetFileName()); pictureEdit.Show(); IsImageLoaded = true; } catch (Exception) { if (pictureEdit != null) { pictureEdit.Hide(); } IsImageLoaded = false; } }