GraphUndoUnit.IsUndoable(GraphObject, GraphProperty) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.