Share via


GraphUndoUnit.IsUndoable(GraphObject, GraphProperty) Method

Definition

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, since the UndoStack would not be allowed to change the value. If false is returned then the property is not preserved across undo/redo.
For transient properties returning false can save a lot of memory in the undo stack.

public:
 static bool IsUndoable(Microsoft::VisualStudio::GraphModel::GraphObject ^ graphObject, Microsoft::VisualStudio::GraphModel::GraphProperty ^ property);
public static bool IsUndoable (Microsoft.VisualStudio.GraphModel.GraphObject graphObject, Microsoft.VisualStudio.GraphModel.GraphProperty property);
static member IsUndoable : Microsoft.VisualStudio.GraphModel.GraphObject * Microsoft.VisualStudio.GraphModel.GraphProperty -> bool
Public Shared Function IsUndoable (graphObject As GraphObject, property As GraphProperty) As Boolean

Parameters

graphObject
GraphObject

The graph object being changed

property
GraphProperty

The property being changed

Returns

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

Applies to