Unplanned
Last Updated: 05 Mar 2021 16:49 by ADMIN
Richard
Created on: 05 Mar 2021 16:33
Category: RichTextBox
Type: Bug Report
0
RichTextBox: NullReferenceException is thrown when inserting a content control into an empty document

When inserting a content control (structured document tag) into an empty RadDocument using one of the overloads of the InsertStructuredDocumentTag method accessible from RadRichTextBox and RadDocumentEditor, a NullReferenceException is thrown.

Workaround: Invoke the EnsureDocumentMeasuredAndArranged method before inserting the content control:

document.EnsureDocumentMeasuredAndArranged();

RadDocumentEditor editor = new RadDocumentEditor(document);
editor.InsertStructuredDocumentTag(SdtType.CheckBox);

0 comments