ContentUndoHelper
Content undo helper to be used with "using {}" to enclose a block of changes.
Constructors
DEPRECATED: Constructs a ContentUndoHelper object inside a using block to handle undo when modifying a RenderContent or - alternatively - create the ContentUndoHelper and explicitly call Dispose when you are done.
obsoletePrefer the one without the description.
Finalizer
~ContentUndoHelper
#~ContentUndoHelper()
Methods
Call this *after* adding a content. Undo will cause the content to be deleted.
public bool AddContent()
content,
Content you just added to the ContentList.
parent
is the content that will become the parent of the new content, or null if the new content is being added at the top level (i.e., not a child).
Returns: true if the content was added.
public void Dispose()
Call this before modifying or deleting a content. Undo will cause the content to be restored.
Returns: true if the content was modified.
Call this before tweaking a single content parameter. Undo will cause the parameter to be restored.
public bool TweakContent()
content,
The render content
parameterName
The parameter name you are about to change.
Returns: true if the content was tweaked.