The default styles are not copied when using the CreateDocumentFromSelection method.
Workaround: Manually copy the styles:
var document = radRichTextBox.Document.Selection.CreateDocumentFromSelection();
document.StyleRepository.Clear();
foreach (var item in radRichTextBox.Document.StyleRepository)
{
var style = new StyleDefinition(item);
document.StyleRepository.Add(style);
}
When "rFonts" is set in docDefaults:
<w:styles>
<w:docDefaults>
<w:rPrDefault>
<w:rPr>
<w:rFonts w:ascii="Verdana" w:eastAsia="Times New Roman" w:hAnsi="Verdana" w:cs="Verdana"/>
...
</w:rPr>
</w:rPrDefault>
and partially in the local run properties:
<w:r>
<w:rPr>
<w:rFonts w:cs="Times New Roman"/>
...
</w:rPr>
<w:t>Text</w:t>
</w:r>
A wrong font is applied.
Expected: Verdana
Actual: Times New Roman
After deleting a custom annotation using the DeleteAnnotationRange method when there is a text immediately in front of the annotation start:
and then trying to delete the last character in this former annotation range an exception is thrown (Exception: System.InvalidOperationException: 'inline does not belong to this document.')
The paste options popup stays visible when the window is deactivated
Workaround:
private void MainWindow_Deactivated(object sender, EventArgs e)