WorkspaceImage Property |
Namespace: Atalasoft.Imaging
When the image that is being set already exists in the ImageCollection, then that image is set as the current, and the ChangedImage event fires. When the image being set does not exist in the collection, the current image is replaced with the new image, and the current image is either added to the UndoCollection, or disposed.
To replace the current image, without disposing it, or placing it into the UndoCollection, use the Replace(AtalaImage) method in the ImageCollection by calling myWorkspace.Images.Replace(newImage) instead of myWorkspace.Image = newImage.