In this case, the MergeField Code value without the brackets gets concatenated before the display name of the MergeField in the document.
This reproduces after the document get exported and the DocxExportSettings' FieldResultMode property is set to FieldDisplayMode.DisplayName.
The MergeField is displayed correctly in RadRichTextBox. The issue occurs only when the document is displayed in MS Word.
To work this around, set the DocxExportSettings FieldResultMode value to null.
DocxFormatProvider docxFormatProvider = new DocxFormatProvider()
{
ExportSettings = new DocxExportSettings()
{
FieldResultMode = null
}
};
The border of the ContentControl is displayed abnormally when the paragraph's TextAlignment is set to Center or Right.
Austria (German) region is set in windows. Digit grouping symbol is set "," and decimal symbol is ".".
Inserting rounded rectangle shape in RichTextBox produces broken geometry like so:
If RadRichTextBox contains a table and is placed in a window and then the window is resized horizontally, the table border are moved unexpectedly and change their place relative to the content of the documen. If the window is maximized and/or restored, some of the borders disappear. Workaround: Execute the following code snippet in window's or RadRichTextBox' SizeChanged event handler: if (this.MyRadRichTextBox.ActiveEditorPresenter != null) { this.MyRadRichTextBox.ActiveEditorPresenter.RecreateUI(); }
NullReferenceException when changing themes, the RichTextBox has TrackChanges enabled, and the current user is set.
Workaround: set empty user like this:
private void RadRichTextBox_ProtectionStateChanged(object sender, EventArgs e)
{
if (this.radRichTextBox.CurrentUser == null)
{
this.radRichTextBox.CurrentUser = new Telerik.Windows.Documents.Model.UserInfo(string.Empty, string.Empty, string.Empty, string.Empty);
}
}
Expanding the table selection with the keyboard leaves the caret behind the selection's edges. After we pass the current cell content, the selection is automatically broadened over the next complete cell, but if we continue to press Shift+Arrow, it takes keystrokes = length of content in the cell + 1 to expand the selection to its next cell, though the selection highlights are already covering that cell.
There is a workaround: you will need to subscribe to the SelectionChanged event and use this code snippet for the event handler:
private void SelectionChanged(object sender, EventArgs e)
{
var selection = this.radRichTextBox.Document.Selection;
var caretPosition = this.radRichTextBox.Document.CaretPosition;
if (selection.IsEmpty)
{
return;
}
if (selection.Ranges.Last.IsReversed)
{
caretPosition.MoveToPosition(selection.Ranges.First.StartPosition);
}
else
{
caretPosition.MoveToPosition(selection.Ranges.Last.EndPosition);
}
}
Inside it, we move the caret to the selection's edges.