In this feature, the existing text is overridden as the user types on it with the "Insert" key is pressed on the keyboard.
Workaround: Track the state of the Insert key and delete before inserting content using the KeyDown and CommandExecuting events:
private void MainDemoControl_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if (e.KeyboardDevice.IsKeyToggled(Key.Insert))
{
this.isInsertKeyPressed = true;
}
else
{
this.isInsertKeyPressed = false;
}
}
private void radRichTextBox_CommandExecuting(object sender, CommandExecutingEventArgs e)
{
if (e.Command is InsertTextCommand && this.isInsertKeyPressed)
{
this.radRichTextBox.Delete(false);
}
}