When a merged cell contains more than one entire column, the caret is in the merged cell and you chose the option to delete the current column, the action is supposed to delete all the columns in the merged cell. What happens instead is that only the first column is deleted and the merged cell remains. Workaround: TableCell tableCell = this.radRichTextBox.Document.CaretPosition.GetCurrentInline().Parent.Parent as TableCell; if(tableCell == null) { return; } int columnSpan = tableCell.ColumnSpan; this.radRichTextBox.Document.History.BeginUndoGroup(); for (int i = 0; i < columnSpan; i++) { this.radRichTextBox.DeleteTableColumn(); } this.radRichTextBox.Document.History.EndUndoGroup("Delete Column");
The 'white-space' CSS property determines how whitespace inside an element is handled. The 'pre' value preserves the sequences of whitespaces and the newlines in the element content. This property value is supported by MS Word.
This would enable the customers to track the content that is being inserted and decline its insertion if needed.
If the position is moved to the end of a paragraph by clicking with the mouse in the empty space just left of the paragraph text, sometimes the subsequent text input (typing, pasting) is inserted at the beginning of the next paragraph, instead of at the end of the clicked one. The issue is somewhat random and cannot be reproduced consistently, though it's not hard to reproduce if clicking and typing is fast enough.
At this point, the FloatingUIContainers cannot be selected. Implement selection to enable the users to work easily with such elements.
When pressing Shift+Up(Down) should create a selection to the start(end) of the document when the caret position is on the first(last) line. Currently, in this case, a selection is not created. Such behavior can be achieved using the following approach: private void RadRichTextBox_CommandExecuting(object sender, CommandExecutingEventArgs e) { if (e.Command is MoveCaretCommand && System.Windows.Input.Keyboard.Modifiers == ModifierKeys.Shift) { var command = e.Command as MoveCaretCommand; MoveCaretDirections direction = (MoveCaretDirections)e.CommandParameter; if (direction == MoveCaretDirections.Up) { var positionOnFirstLine = new DocumentPosition(this.radRichTextBox.Document); positionOnFirstLine.MoveToFirstPositionInDocument(); if (this.radRichTextBox.Document.CaretPosition.Location.Y - positionOnFirstLine.Location.Y < 1) { this.radRichTextBox.Document.CaretPosition.MoveToPosition(positionOnFirstLine); e.Cancel = true; } } else if (direction == MoveCaretDirections.Down) { var positionOnLastLine = new DocumentPosition(this.radRichTextBox.Document); positionOnLastLine.MoveToLastPositionInDocument(); if (positionOnLastLine.Location.Y - this.radRichTextBox.Document.CaretPosition.Location.Y < 1) { this.radRichTextBox.Document.CaretPosition.MoveToPosition(positionOnLastLine); e.Cancel = true; } } } }
API ideas: - DocumentSelection: Get inlines between annotation start and end, e.g. DocumentSelection.EnumerateChildrenOfType<>(bool includePartiallySelectedElements) where T : DocumentElement - DocumentSelection: SelectAnnotationRange(AnnotationRangeStart start, bool includeAnnotation). Such method is present without the last parameter, but it always selects the annotation ranges
Steps to reproduce: 1. Insert a table into the document with borders enabled 2. Zoom out so the zoom level is below 100% Expected behavior: The borders are always rendered at a minimum of 1px width, even if the calculated size is below 1 at the current zoom level (This is what Word does) Actual behavior: Some of the borders do not render.
Seems that the algorithm is not showing the appropriate results when a word has apostrophe. For example typing "etre" does not suggest "ĂȘtre". A custom third-party spell checker library - NHunspell can be used. SDK Example demonstrating this approach can be found in our XAML-SDK portal: https://github.com/telerik/xaml-sdk/tree/master/RichTextBox/NHunspellSpellChecking
In MS Word, when track changes are enabled, the users can choose to show the revisions in balloons, similar to comments. Add such possibility in RadRichTextBox as well.
The properties applied locally to the content are not preserved and used for the new content when the user changes the paragraph indent. Workaround: Keep the properties in a variable and apply them after executing the command: StyleDefinition style; private void RadRichTextBox_CommandExecuted(object sender, CommandExecutedEventArgs e) { if (e.Command is IncrementParagraphLeftIndentCommand) { this.radRichTextBox.CurrentEditingStyle.CopyPropertiesFrom(style); } } private void RadRichTextBox_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e) { if (e.Command is IncrementParagraphLeftIndentCommand) { style = new StyleDefinition(this.radRichTextBox.CurrentEditingStyle); } }
private
void
RadRichTextBox_CommandExecuting(
object
sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)
{
if
(e.Command
is
PasteCommand &&
this
.radRichTextBox.Document.IsEmpty)
{
this
.radRichTextBox.Insert(
" "
);
}
}