Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
CancelUndo Method
See Also 
Leadtools.Annotations Namespace > AnnAutomation Class : CancelUndo Method




Cancels the undo node started in this AnnAutomation object.

Syntax

Visual Basic (Declaration) 
Public Overridable Sub CancelUndo() 
Visual Basic (Usage)Copy Code
Dim instance As AnnAutomation
 
instance.CancelUndo()
C# 
public virtual void CancelUndo()
Managed Extensions for C++ 
public: virtual void CancelUndo(); 
C++/CLI 
public:
virtual void CancelUndo(); 

Example

For an example, refer to BeginUndo.

Remarks

Use this method along with the BeginUndo and EndUndo methods to programmatically add a node to the undo stack maintained by this AnnAutomation object. Typically, you add an undo node as follows:

  1. Call the BeginUndo method before you make any changes to create a new node.
  2. Perform any changes to the AnnAutomation object.
  3. Call the EndUndo method to commit this undo node into the undo stack of the AnnAutomation object.
  4. In case of errors (typically in a catch statement), call the CancelUndo method to remove the node and cancel the operation.

You do not need to manually call the BeginUndo, EndUndo or CancelUndo methods when calling methods from this AnnAutomation object directly. The AnnAutomation object will internally do this for you. For example, when you call the Delete method to delete the object(s) currently being edited, the AnnAutomation object will perform the above sequence internally to add the undo node.

Use the UndoCapacity property to get or set the number of user actions that can be reversed using the Undo method, or re-applied using the Redo method. The default for the UndoCapacity property is 10 actions.

For more information, refer to Undoing Automation Operations.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features