GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoDocument Class / IsModified Property
In This Topic
    IsModified Property
    In This Topic
    Gets or sets whether this document is considered changed from an earlier state.
    Syntax
    public bool IsModified {get; set;}

    Property Value

    true if this document has been marked as having been modified, if the UndoManager has recorded any changes, or if an undo has been performed without a corresponding redo.
    Remarks

    This property is set to true in OnChanged. Setting this property to a new value calls InvalidateViews, but does not raise a Changed event.

    Although you can set this property at any time, the value of GoDocument.IsModified will continue to be true as long as there have been changes made to the document and you are using an UndoManager. Any modifications to a GoDocument or one of its parts will result in setting GoDocument.IsModified to true and in adding a GoChangedEventArgs to the GoUndoManager.GoUndoManager.CurrentEdit list, which holds all of the changes for undo/redo.

    When using an UndoManager, you should be making all changes within a transaction. After finishing or aborting a transaction, you can set GoDocument.IsModified to false, and then it will remain false until another change is made to the document.

    When there is no UndoManager, this property is implemented as only a simple boolean state variable.

    See Also