I have a scenario where text changes can occur programmatically and non-programmatically and I only want the undo list to include non-programmatic changes.
For programmatic changes, I'm updating my document's Text via the Document.Text property. That works too well considering that it clears the undo list.
While I can use ReplaceText() instead, that's a problem since all text changes are now added, not just changes from user typing.
Is there some way to limit the undo list to only add non-programmatic changes? Could I store the undo/redo lists before the change and re-apply them after? Is there a handler that would let me intercept the undo list change behavior? Does the WPF Control behave differently?
Thanks,
-Craig
For programmatic changes, I'm updating my document's Text via the Document.Text property. That works too well considering that it clears the undo list.
While I can use ReplaceText() instead, that's a problem since all text changes are now added, not just changes from user typing.
Is there some way to limit the undo list to only add non-programmatic changes? Could I store the undo/redo lists before the change and re-apply them after? Is there a handler that would let me intercept the undo list change behavior? Does the WPF Control behave differently?
Thanks,
-Craig