You can undo any editing changes that you perform on the design window, and you can redo any changes that you have previously undone.
To undo a move, resize, align, or delete performed on an object in the design window, select Undo from the Edit menu or press Ctrl+Z. To redo an action, select Redo from the Edit menu or press Ctrl+Y.
The undo or redo changes are specific to the current design window. To undo or redo the actions, you must have focus on the design window.
Note: Only editing actions that have occurred since the most recent save operation can be undone and redone; you cannot use Undo to return to a state earlier than the latest saved version of the file. To revert to an earlier saved version, right-click the class file in the Project Explorer view and select Replace With > Local History from the context menu.