Unplanned
Last Updated: 10 Mar 2023 11:09 by ADMIN
Caesar
Created on: 03 Aug 2022 10:35
Category: RichTextBox
Type: Bug Report
4
RichTextBox: Importing document with block-level content controls from XAML causes them to become corrupt.

Importing a document with block-level content controls from XAML causes them to become corrupt. If you scroll to a position in which the said control is only partially visible a NullReferenceException is thrown.

A possible workaround would be to initially save the document as a DOCX (just exporting it to DOCX will not fix the issue as the information is already corrupt).

Another way to reproduce this issue:

1. Create a new document and insert a Rich Text Content Control.

2. Save the document as a XAML file.

3. Reopen the XAML file.

4. Move the caret inside the Content Control.

5. Try to insert a new line by hitting Enter - no new line is added as the content control is marked as Inline Level after the import in step 3.

Case 2: 

Create a document with TOC where the content control of the TOC contains some other inlines.

 

1 comment
Caesar
Posted on: 19 Aug 2022 02:35

There is another way to reproduce the issue:

Insert a Rich Text Content Control to current document,paste large pieces of text (for example, content in the attach)into it. If I save the document as a xaml file and reopen it, this raises the foregoing problem.

If I save it as a docx file and reopen it, it works fine.

But in my scenario, I have lots of custom annotations in my documents, saving as DOCX is not an option for me.

Attached Files: