I'm still really struggling with the documentation for Undo/Redo. Will there be more documentation posted soon?
Thanks for the responses. I am very excited about Undo/Redo and would like to use it. Here is an example of the difficulty I'm having with the documentation:
http://help.infragistics.com/Help/NetAdvantage/WPF/2012.1/CLR4.0/html/InfragisticsWPF4.Undo.v12.1~Infragistics.Undo.UndoUnit_members.html
I do not see any documentation for the method, "Execute"
Regarding the UndoExecuteContext, what is the difference between "ExecuteItemType" and "Reason"? They look very similar to me.
Why is Target a required member of UndoUnit? How is it used by UndoManager?
Is this implementation essentially how I would use UndoManager, or would I use it in a different way?
using Infragistics.Undo;
namespace UndoExample
{
public class Change : UndoUnit
public string MyProperty { get; set; }
public Change()
MyProperty = "Original.";
}
protected override bool Execute(UndoExecuteContext executeInfo)
if (executeInfo.ExecuteItemType == UndoHistoryItemType.Undo)
MyProperty = "Undone.";
else
MyProperty = "Redone.";
return true;
public override string GetDescription(UndoHistoryItemType itemType, bool detailed)
return "Change MyProperty";
public override object Target
get { return null; }
class Program
static void Main(string[] args)
UndoManager mgr = new UndoManager();
var change = new Change();
System.Console.Out.WriteLine(change.MyProperty);
mgr.AddChange(change);
mgr.Undo();
WayneMiller said: I sort of understand what is going on with Undo units, but I don't understand what registration is and why its needed. Is it always used, or just in special cases?
I sort of understand what is going on with Undo units, but I don't understand what registration is and why its needed. Is it always used, or just in special cases?
The documentation online is a fine start, but I was hoping for much more documentation than what exists there already.
Code snippets in the documentation would be very useful. I know that there are larger sample projects that can be downloaded, but these are not as effective in learning the simple concepts. Here is an example of Microsoft documentation that illustrates the use of a small, complete example inline with the document:
http://msdn.microsoft.com/en-us/library/system.componentmodel.composition.hosting.compositioncontainer
Hello Wayne,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you for your post. I have been reading through it and since the Undo/Redo Framework has been released with version 12.1, the documentation for the framework has also been released. You can find detailed information regarding the Undo/Redo Framework in our online documentation here: http://help.infragistics.com/Help/NetAdvantage/WPF/2012.1/CLR4.0/html/Infragistics_Undo_Redo_Framework.html
Please let me know if you need any further assistance on the matter.