ArgumentException occurs when using the voice typing feature of Windows (started with the Windows Key + H key combo) to convert speech to text in RadRichTextBox.
Exception stacktrace:
System.ArgumentException: 'Requested distance is outside the content of the associated document.'PresentationFramework.dll!System.Windows.Documents.TextPointer.TextPointer(System.Windows.Documents.TextContainer textContainer, int offset, System.Windows.Documents.LogicalDirection direction) PresentationFramework.dll!System.Windows.Documents.TextContainer.CreatePointerAtOffset(int offset, System.Windows.Documents.LogicalDirection direction) PresentationFramework.dll!System.Windows.Documents.TextParentUndoUnit.Do() PresentationFramework.dll!MS.Internal.Documents.UndoManager.Redo(int count) PresentationFramework.dll!System.Windows.Documents.TextStore.RedoQuietly(int count) PresentationFramework.dll!System.Windows.Documents.TextStore.SetFinalDocumentState(MS.Internal.Documents.UndoManager undoManager, System.Collections.Stack imeChangeStack, int appChangeCount, int imeSelectionAnchorOffset, int imeSelectionMovingOffset, int appSelectionAnchorOffset, int appSelectionMovingOffset) PresentationFramework.dll!System.Windows.Documents.TextStore.HandleCompositionEvents(int previousUndoCount) PresentationFramework.dll!System.Windows.Documents.TextStore.GrantLockWorker(MS.Win32.UnsafeNativeMethods.LockFlags flags) PresentationFramework.dll!System.Windows.Documents.TextStore.RequestLock(MS.Win32.UnsafeNativeMethods.LockFlags flags, out int hrSession)
FormatException is thrown during the import of a table coming from a docx document when the application culture is "sv-SE". This happens when the column width in the document is a floating point number (ex: 120.65). The Swedish culture uses "," as decimal separator and " " as the number group separator, which makes any invariant decimal value (like 120.65) invalid during standard parsing (ex: float.Parse("120.65")).
Stacktrace:
FormatException: The input string '4514.5' was not in the correct format. at System.Single.Parse(String s) Telerik.Windows.Controls.RichTextBox.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.TableImporter.ImportTableGrid(Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Parsing.Style style) Telerik.Windows.Controls.RichTextBox.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.TableImporter.Import(Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Parsing.Style parentStyle) Telerik.Windows.Controls.RichTextBox.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.MainDocumentImporter.BuildTable(Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Parsing.Style parentStyle) Telerik.Windows.Controls.RichTextBox.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.MainDocumentImporter.BuildBody() Telerik.Windows.Controls.RichTextBox.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.MainDocumentImporter.BuildDocument() Telerik.Windows.Controls.RichTextBox.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.MainDocumentImporter.Import()Telerik.Windows.Controls.RichTextBox.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxImporter.ReadXmlContentFromPackage(Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxPartImporterBase importer) Telerik.Windows.Controls.RichTextBox.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxImporter.ReadXmlContentAndRelationsFromPackage(Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxPartImporterBase importer) Telerik.Windows.Controls.RichTextBox.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.Import.DocxImporter.Import() Telerik.Windows.Controls.RichTextBox.dll!Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider.Import(System.IO.Stream input)
To work this around, switch to InvariantCulture during the import and return the original culture after that.
var cultureCache = Thread.CurrentThread.CurrentCulture;
Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.InvariantCulture;
var provider= new DocxFormatProvider();
rtb.Document = provider.Import(stream);
Thread.CurrentThread.CurrentCulture = cultureCache;
Thread.CurrentThread.CurrentUICulture = cultureCache;
RichTextBox: Bullet list with several levels is not viewed correctly in WordPad.
In Word, this works as expected. When the document is imported into RadRichTextBox, this works as well.
Bold/Italic does not work for some font styles.
This might be a framework limitation in WPF: https://www.telerik.com/forums/some-fonts-are-not-able-to-bold-italic
Sample fonts list:
It seems that the first time a Center TextAlignment is applied to the selection, its length is cached. Because of this, when the selection content (text) changes the length is not updated, thus the text doesn't align properly. It aligns accord to the initial length of the context. The content doesn't update also if the alignment is reset.
To work this around, avoid the FlowNoWrap layout mode and use only Flow.

The issue reproduces when track changes is enabled and new text is entered. After waiting some time and pressing the Backspace on the keyboard in order to delete a character, nothing happens. You should press the Backspace a second time in order to make the deletion work. After that you can delete the content normally.
The waiting time before pressing the Backspace is usually until the next minute of the clock comes. For example, you can write something at 14:55 and wait until 14:56. Then, press Backspace.
If you check the Output pane of Visual Studio you will see the following assertion failure message printed:
---- DEBUG ASSERTION FAILED ---- at Telerik.Windows.Documents.Model.RadDocumentEditor.DeleteTrackChanges(Boolean deletePrevious) in C:\PersonalFiles\Git\wpf\Controls\RichTextBox\Core\Model\RadDocumentEditor_Editing.cs:line 693 at Telerik.Windows.Documents.Model.RadDocumentEditor.Delete(Boolean deletePrevious) in C:\PersonalFiles\Git\wpf\Controls\RichTextBox\Core\Model\RadDocumentEditor_Editing.cs:line 85 at Telerik.Windows.Controls.RadRichTextBox.Telerik.Windows.Documents.Model.IDocumentEditor.Delete(Boolean deletePrevious) in C:\PersonalFiles\Git\wpf\Controls\RichTextBox\Core\UI\RadRichTextBox.cs:line 4890 at Telerik.Windows.Controls.RadRichTextBox.Delete(Boolean deletePrevious) in C:\PersonalFiles\Git\wpf\Controls\RichTextBox\Core\UI\RadRichTextBox.cs:line 4866 at Telerik.Windows.Documents.RichTextBoxCommands.DeleteCommand.ExecuteOverride(Object parameter) in C:\PersonalFiles\Git\wpf\Controls\RichTextBox\Core\RichTextBoxCommands\DeleteCommand.cs:line 57 at Telerik.Windows.Documents.RichTextBoxCommands.RichTextBoxCommandBase.Execute(Object parameter, Boolean focusCaret) in C:\PersonalFiles\Git\wpf\Controls\RichTextBox\Core\RichTextBoxCommands\RichTextBoxCommandBase.cs:line 316 at Telerik.Windows.Documents.RichTextBoxCommands.RichTextBoxCommandBase.Execute(Object parameter) in C:\PersonalFiles\Git\wpf\Controls\RichTextBox\Core\RichTextBoxCommands\RichTextBoxCommandBase.cs:line 285 at Telerik.Windows.Documents.RichTextBoxCommands.RichTextBoxRoutedCommand.Execute(Object parameter, RadRichTextBox radRichTextBox) in C:\PersonalFiles\Git\wpf\Controls\RichTextBox\Core\RichTextBoxCommands\RoutedCommands\RichTextBoxRoutedCommand.cs:line 57 at Telerik.Windows.Documents.RichTextBoxCommands.RichTextBoxRoutedCommand.CommandBindingHelper.CommandBinding_Executed(Object sender, ExecutedRoutedEventArgs e) in C:\PersonalFiles\Git\wpf\Controls\RichTextBox\Core\RichTextBoxCommands\RoutedCommands\RichTextBoxRoutedCommand.cs:line 17 at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e) at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute) at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e) at System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e) at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated) at System.Windows.Input.RoutedCommand.Execute(Object parameter, IInputElement target) at System.Windows.Input.RoutedCommand.System.Windows.Input.ICommand.Execute(Object parameter) at Telerik.Windows.Documents.UI.Extensibility.DefaultInputHandler.HandleInput(RadRichTextBox richTextBox, PreviewEditorKeyEventArgs e) in C:\PersonalFiles\Git\wpf\Controls\RichTextBox\Core\RichTextBoxCommands\RoutedCommands\DefaultInputHandler.cs:line 54 at Telerik.Windows.Controls.RadRichTextBox.HandlePresenterKeyDown(PreviewEditorKeyEventArgs e) in C:\PersonalFiles\Git\wpf\Controls\RichTextBox\Core\UI\RadRichTextBox.cs:line 4612 at Telerik.Windows.Documents.UI.DocumentPresenterBase.HandleKeyDown(KeyEventArgs e) in C:\PersonalFiles\Git\wpf\Controls\RichTextBox\Core\UI\DocumentPresenterBase.cs:line 859 at Telerik.Windows.Documents.UI.DocumentPresenterBase.OnPreviewKeyDown(KeyEventArgs e) in C:\PersonalFiles\Git\wpf\Controls\RichTextBox\Core\UI\DocumentPresenterBase.cs:line 805
When the exported document contains a very precise indent values, these are saved using scientific notation, which is unsupported in MS Word. Opening the file in Word results in the following error: "Word experienced an error trying to open the file."

Here is an example of the troublesome setting in the body of the produced document:
<w:ind w:firstLine="6.420405952667352E-06" w:left="76.53543090820312" w:right="0" />To work this around, you can open the exported document with the WordsProcessing library. This will give you a RadFlowDocument object which then can be exported to a file again. This will save the indent values properly in the new document.
var dplProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
using (var inputStream = File.OpenRead("../../../originalFile.docx"))
{
Telerik.Windows.Documents.Flow.Model.RadFlowDocument flowDoc = dplProvider.Import(inputStream, TimeSpan.FromSeconds(5));
using (var outputStream = File.OpenWrite("../../../convertedFile.docx"))
{
dplProvider.Export(flowDoc, outputStream, TimeSpan.FromSeconds(5));
}
}
Or if you use the RichTextBox document model only to create documents in code (without using the RadRichTextBox control), you can replace the code with the WordsProcessing API.