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);
}
RadRichTextBox doesn't render a border that is not locally defined. In this case, the corresponding border from the applied table style should be used.
Currently, there is a DocumentHistory property IsEnabled indicating whether the history for the RadDocument is enabled. This property is not working and history cannot be disabled.
Workaround:
Use DocumentHistory Clear() method by attaching to editor's CommandExecuted event.
private void Editor_CommandExecuted(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutedEventArgs e)
{
editor.Document.History.Clear();
}
When the Track Changes is On and we try to change the style it applies the first time but the second try throws an exception and the style doesn't apply: System.ArgumentNullException: 'Value cannot be null. Parameter name: owner'.
1. Add new text "TEST".
2. Select the text and set a new style "Heading 2", then "Heading 1".
Observed: Heading 1 doesn`t appear.
When the Track Changes is activated, a Hyperlink is inserted to a text and we try to reject changes the rejection is not applied correctly.
The result:
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
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);
Bookmarks are not imported and missing from a specific document scenario.
Workaround: Import and then export the document using the WordsProcessing library and then open it with the editor.
Binding errors from RadRibbonGallery in the TableStylesGallery are outputted in the Output window in Visual Studio, because of binding to the StyleDefinitions and CurrenSelectedStyle properties of the gallery's view model.