Handles undo / redo of property changes.
Namespace: MindFusion.Scheduling
Assembly: MindFusion.Scheduling.Wpf
SyntaxC#
Copy Code
|
|---|
public class ChangeItemCommand : Command |
Visual Basic
Copy Code
|
|---|
Public Class ChangeItemCommand |
RemarksThe ChangeItemCommand constructor records the state of an item, and its Undo and Redo methods restore the item to either its old or new state.
ExampleThe following example shows the pattern that should be used to save the state of an item for later undo.
C#
Copy Code
|
|---|
| Item item = calendar.ItemSelection.Items[0]; if (item != null) { ChangeItemCommand change = new ChangeItemCommand(calendar.Schedule, item); item.HeaderText = "new header"; item.StartTime = DateTime.Now; item.EndTime = DateTime.Now.AddHours(2); calendar.Schedule.ExecuteCommand(change); } |
Visual Basic
Copy Code
|
|---|
Dim item = calendar.ItemSelection.Items(0) |
Inheritance HierarchySystem.Object![]()
MindFusion.Scheduling.Command
MindFusion.Scheduling.ChangeItemCommand
See Also