GraphUndoUnit::IsUndoable Method (GraphObject^, GraphProperty^)

 

Return true if changes to the given property on the given graphObject are undoable or not.

This method returns true if the property metadata has the IsUndoable flag set or it returns false if it does not have the IsSharable or IsSerializable flag. Also if it has IsWriteOnce then it also returns false, because the UndoStack would not be able to change the value.

If false is returned then the property is not preserved across undo/redo.

For transient properties returning false can save lots of memory in the undo stack.

Namespace:   Microsoft.VisualStudio.GraphModel
Assembly:  Microsoft.VisualStudio.GraphModel (in Microsoft.VisualStudio.GraphModel.dll)

public:
static bool IsUndoable(
	GraphObject^ graphObject,
	GraphProperty^ property
)

Parameters

graphObject
Type: Microsoft.VisualStudio.GraphModel::GraphObject^

The graph object being changed

property
Type: Microsoft.VisualStudio.GraphModel::GraphProperty^

The property being changed

Return Value

Type: System::Boolean

True if the property value has to be undone and redone otherwise false.

Return to top
Show: