ContentUndoHelper

Content undo helper to be used with "using {}" to enclose a block of changes.

Constructors

ContentUndoHelper

#Since v6.0 Obsolete v8.0
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.
public ContentUndoHelper(
doc,
description
Unused: Undo description (which appears in the UI when undo is run)
)
obsoletePrefer the one without the description.

ContentUndoHelper

#Since v8.0
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.
public ContentUndoHelper()

Finalizer

~ContentUndoHelper

#
~ContentUndoHelper()

Methods

AddContent

#Since v6.0
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).
)
true if the content was added.

Dispose

#Since v6.0
public void Dispose()

Dispose

#
protected virtual void Dispose(
isDisposing
)

ModifyContent

#Since v6.0
Call this before modifying or deleting a content. Undo will cause the content to be restored.
public bool ModifyContent(
content
Content you are about to modify.
)
true if the content was modified.

TweakContent

#Since v6.0
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.
)
true if the content was tweaked.