Hello
I am trying to fix some text when it is being inserted in a richtexteditor but each time I move the caret position to document end the font changes back to default. This is my code:
if (txtCorrections.Text[txtCorrections.Text.Length - 1] == ')' && txtCorrections.Text[txtCorrections.Text.Length - 2] == ' ')
{
txtCorrections.Text = txtCorrections.Text.Remove(txtCorrections.Text.Length - 2, 1);
txtCorrections.Document.CaretPosition.MoveToDocumentEnd();
}
I use this code in a textChanged.
Thank you for help.