Creates an 'active' composite record with the specified settings.
Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming
C# Copy Code |
---|
public CompositeCmd StartComposite ( |
Visual Basic Copy Code |
---|
Public Function StartComposite( _ |
A string to be associated with the composite record. It can be used later to give more information to users what exactly will be undone or redone. Use the Title property of the command class to get the title of an action record.
Set this parameter to true to save the whole z-order array before executing the composite command, and to restore it back when the command is undone. Use that when there will be create or delete commands added to the composite one, because they do not guarantee restoring the items in the same z-order when the commands are undone or redone.
An instance of the CompositeCmd class which represents the active composite record. Call its Execute method when done with recording actions in the composite.
Sometimes several actions must be represented as a single atomic operation. That can be achieved by using composites, represented by the CompositeCmd class. However actions records that are implicitly created by MindFusion.Diagramming as a response to users actions or method calls cannot be added directly to a composite. The StartComposite method creates an 'active' composite, to which implicitly created records are added automatically. Call the composite's Execute method to stop adding action records to it and save it in the command history. Calling Undo or Redo for the composite record, undoes or redoes all actions contained within it.