Created
April 7, 2021 09:09
-
-
Save bjoerntx/f276fe16401983fcecc9f8d7dedd29cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private bool _isMarkupVisible = true; | |
private void btnToggleMarkup_Click(object sender, EventArgs e) { | |
_isMarkupVisible = !_isMarkupVisible; | |
ToggleMarkup(); | |
} | |
private void textControl1_Changed(object sender, EventArgs e) { | |
ToggleMarkup(); | |
} | |
private void ToggleMarkup() { | |
foreach (TXTextControl.TrackedChange change in textControl1.TrackedChanges) { | |
if (change.ChangeKind == TXTextControl.ChangeKind.DeletedText) | |
continue; | |
change.HighlightMode = _isMarkupVisible == true ? | |
TXTextControl.HighlightMode.Always : | |
TXTextControl.HighlightMode.Never; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment