This documentation is for the old version. Go to the latest Graphics Mill docs

Bitmap.UndoRedoEnabled Property

Enables or disables undo/redo functionality.

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)


Visual Basic
Public Overridable Property UndoRedoEnabled As Boolean
public virtual bool UndoRedoEnabled { get; set; }

Property Value

Value specifying if to enable undo/redo functionality.


You can use this property to disable undo/redo functionality for some time. It is useful when, for example, you apply some set of effects or draw a number of shapes as single atomic operation. In this case you likely do not want to undo sub-operations, but need to undo entire operation at once. For example, you draw a star (with several calls of DrawLine(Pen, Int32, Int32, Int32, Int32) method). Your actions should be the following:

  1. Set this property to false.
  2. Draw a star by attaching this Bitmap to GdiGraphics. Draw attention, although event Changed fires, bitmap state is not stored.
  3. After you finish, set this property back to true.
  4. Save the result state with SaveState() method.

After this you can call Undo() method and entire star is erased instead of single line you draw last time.

By default this property is true.

See Also