MarkdownDocumentEditor.IsDirty

This is multi-purpose function that:

  • Retrieves the text from the editor into the Document.CurrentText * Checks to see if the previous CurrentText matches the retrieved text This is the current change dirty status and the value returned * Updates the Document.IsDirty flag based on CurrentText == OriginalText This is the dirty status since last Save/Load - set only, not returned
public Task<Boolean> IsDirty(bool previewIfDirty)

Return Value

true or false

Parameters

previewIfDirty

Remarks

Note: Different than the Document.IsDirty property which returns the dirty status since last save - this returns whether the editor's text and the WPF object text has changed.

Mainly called from the editor to determine whether the preview needs to be refreshed as well as by WPF code that needs to explicitly refresh the document save dirty status.


See also:

Class MarkdownDocumentEditor

© West Wind Technologies, 2016-2023 • Updated: 11/23/21
Comment or report problem with topic