There seems to be a infinite loop occuring the internal RichTextBox's native code in MeasureOverride. The issue doesn't seem to occur if everything is statically defined in XAML. It only happens when Runs (with RTL text) and InlineUIContainers are added programmatically to the RichTextBox model. It is possible that only certain characters cause this. This can be demonstrated with samples with Arabic and Hebrew text.As an aside, there also seems to be the same CPU spinning when GetNextInsertionPosition is called on the same bad run of text. I haven't made a sample for it but it seems related. Let me know if a sample should be created for that as well.
Product Language
Visual Studio Version
Operating System
Operating System Language
Steps to Reproduce
Actual Results
Expected Results