/// <summary>
 /// Shows a PropertyGrid Dialog and uses the specified object as the edit copy.
 /// </summary>
 /// <param name="editCopy"></param>
 public void ShowDialog(object editCopy)
 {
     _frmDialog = new PropertyDialog();
     _frmDialog.PropertyGrid.SelectedObject = editCopy;
     _frmDialog.ChangesApplied += frmDialog_ChangesApplied;
     _frmDialog.ShowDialog();
 }
 private void Image_PropertiesClicked(object sender, ImageLayerEventArgs e)
 {
     using (PropertyDialog dlg = new PropertyDialog())
     {
         dlg.PropertyGrid.SelectedObject = e.ImageLayer.Copy();
         dlg.OriginalObject = e.ImageLayer;
         dlg.ShowDialog(Owner);
     }
 }