Unplanned
Last Updated: 31 Oct 2022 12:54 by Caesar
Caesar
Created on: 31 Oct 2022 12:54
Category: RichTextBox
Type: Bug Report
0
RichTextBox: DeleteAnnotationRange fails to execute when the content is uneditable annotation

DeleteAnnotationRange fails to execute when the content is uneditable annotation. For example: PermissionRange with a checkbox content control inside.

A possible workaround would be to manually delete the annotation range from the document element tree:

var rangeEnd = rangeStart.End;
var endParent = rangeEnd.Parent;
if (endParent != null)
{
    endParent.Children.Remove(rangeEnd);
}

var parent = rangeStart.Parent;
if (parent != null)
{
    parent.Children.Remove(rangeStart);
}

this.radRichTextBox.UpdateEditorLayout();

0 comments