Articles in this section
Category / Section

How to enable Undo/Redo feature in WPF Diagram (SfDiagram)?

1 min read

This article explains how to enable Undo/Redo feature in WPF Diagram.

Diagram provides support tracks the history of actions that are performed after initializing the diagram and provides support to reverse and restore those changes. Undo is a function performed to reverse the action of an earlier action. The redo function restores any actions that have been previously undone using an undo action. Undo/Redo for diagram can be enabled/disabled with the Constraints property.

The following code snippet explains how to enable undo/redo functionalities in SfDiagram control.

C#

//Creating instance of SfDiagram class.
SfDiagram diagram = new SfDiagram();
diagram.Constraints = GraphConstraints.Default | GraphConstraints.Undoable;

Take a moment to peruse the documentation, where you can find complete constraints list of SfDiagram control and its elements of Node, Connector, Annotations and Ports with code examples.

Refer here to explore the rich set of Syncfusion Essential SfDiagram features.

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied