Handles undo / redo of property changes.
Namespace: MindFusion.Scheduling
Assembly: MindFusion.Scheduling.Silverlight
C# Copy Code |
---|
public class ChangeItemCommand : Command |
Visual Basic Copy Code |
---|
Public Class ChangeItemCommand |
The ChangeItemCommand constructor records the state of an item, and its Undo and Redo methods restore the item to either its old or new state.
The 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) |
System.Object
MindFusion.Scheduling.Command
MindFusion.Scheduling.ChangeItemCommand