Click or drag to resize

AnnotationUndoManagerEndUndoMerge Method

Exits the collective undo state and stores all actions added since the BeginUndoMerge call as a single undo operation.

Namespace:  Atalasoft.Annotate.UI
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
public void EndUndoMerge(
	string description
)

Parameters

description
Type: SystemString
A short description of the collective undo action.
Examples
The following example combines multiple property changes into a single undo using the BeginUndoMerge and EndUndoMerge(String) methods.
UndoMerge
// Tell the AnnotationUndoManager to combine the undo changes.
this.annotateViewer1.Annotations.UndoManager.BeginUndoMerge();

// Make some changes to the active annotation.
AnnotationUI ann = this.annotateViewer1.Annotations.ActiveAnnotation;
ann.Data.Name = "My New Name";
ann.Data.Size = new SizeF(100, 120);
ann.Data.Location = new PointF(45, 60);

// Store the above changes into a single undo.
this.annotateViewer1.Annotations.UndoManager.EndUndoMerge();
UndoMergeVB
' Tell the AnnotationUndoManager to combine the undo changes.
Me.annotateViewer1.Annotations.UndoManager.BeginUndoMerge()

' Make some changes to the active annotation.
Dim ann As AnnotationUI =  Me.annotateViewer1.Annotations.ActiveAnnotation 
ann.Data.Name = "My New Name"
ann.Data.Size = New SizeF(100, 120)
ann.Data.Location = New PointF(45, 60)

' Store the above changes into a single undo.
Me.annotateViewer1.Annotations.UndoManager.EndUndoMerge()
See Also