Type in Japanese text in RichTextBox that word wraps beyond the first line and export it to PDF. The text should always be left aligned (as visually shown when typing) but has an "indent" when exported when the font is Segoe UI.
The operating system region and language needs to be set to Japanese.
RichTextBox seems to have several issues with Japanese, but being locked from visibility or edit is the biggest one.
To recreate, start typing in Japanese, push the "right" arrow after selecting the IME option desired, then hit "spacebar." This seems to duplicate the text, then when trying to continue to type into the text field the text is no longer visible (yet the IME does display).
The native WPF RichTextBox has no issues (and also supports partial selection, etc.).
I've attached a video to show the behavior with 2025 Q1 telerik.
*note:* This is on a machine with NVIDIA graphics. I mention this as there may be some issues with RichTextBox and the hardware... When I'm in a virtual machine with a completely Japanese environment and virtual graphics driver, there is NO text visible at all when trying to type into the RichTextBox. Works fine with other controls and wpf RichTextBox.
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.
NullReferenceException is thrown when the document gets updated after TableRow objects were removed with the Remove method of the parent Rows collection of the Table.
The table.Rows.Remove method is not properly removing some of the rows.
Stacktrace:
Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Model.TableGridMeasurer.CalculateTableCellMinMaxWidths(Telerik.Windows.Documents.Model.TableCell cell, float availableWidth) Line 137 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Model.TableGridMeasurer.CalculateTableMinMaxWidths(Telerik.Windows.Documents.Model.Table table, float availableWidth) Line 165 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Model.TableGridMeasurer.MeasureAutoFit(Telerik.Windows.Documents.Model.Table table, float availableWidth) Line 229 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Model.Table.RecalculateColumnWidths(float measureWidth) Line 1151 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Model.Table.RecalculateTableGrid(float measureWidth) Line 1249 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Layout.TableLayoutBox.MeasureOverride(Telerik.Windows.Documents.Model.SizeF availableSize) Line 265 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Layout.LayoutElement.MeasureCore(Telerik.Windows.Documents.Model.SizeF availableSize) Line 933 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Layout.LayoutElement.Measure(Telerik.Windows.Documents.Model.SizeF availableSize) Line 836 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Layout.SectionLayoutBox.MeasureOverrideInternal(Telerik.Windows.Documents.Model.SizeF availableSize) Line 721 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Layout.SectionLayoutBox.MeasureOverride(Telerik.Windows.Documents.Model.SizeF availableSize) Line 468 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Layout.LayoutElement.MeasureCore(Telerik.Windows.Documents.Model.SizeF availableSize) Line 933 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Layout.LayoutElement.Measure(Telerik.Windows.Documents.Model.SizeF availableSize) Line 836 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Layout.DocumentLayoutBox.MeasureOverrideInternal(Telerik.Windows.Documents.Model.SizeF availableSize) Line 223 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Layout.DocumentLayoutBox.MeasureOverride(Telerik.Windows.Documents.Model.SizeF availableSize) Line 150 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Layout.LayoutElement.MeasureCore(Telerik.Windows.Documents.Model.SizeF availableSize) Line 933 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Layout.LayoutElement.Measure(Telerik.Windows.Documents.Model.SizeF availableSize) Line 836 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.Model.RadDocument.Measure(Telerik.Windows.Documents.Model.SizeF measureSize) Line 1515 C# Telerik.Windows.Documents.dll!Telerik.Windows.Documents.UI.DocumentPrintLayoutPresenter.MeasureOverride(System.Windows.Size availableSize) Line 714 C#
To work this around, use the DeleteTableRow method of the RadDocumentEditor.
RadDocumentEditor documentEditor = new RadDocumentEditor(document); documentEditor.DeleteTableRow(row);
Implement child dialogs for Style Formatting Properties Dialog. This will allow users to modify Style's properties related to font properties, paragraph properties, tabs, numbering and borders.
When RadRichTextBox for WPF is hosted in a WinForms application (through ElementHost), typing with Japanese IME duplicates the typed letters, which makes the control unusable with the default behavior. Possible workaround: Create custom caret. There are some suggestions in this forum thread: https://www.telerik.com/forums/richtextbox-doesn't-support-japanese-ime-when-hosted-in-winforms
A SocketException can occur when the ImageInline source is assigned to a link pointing to a picture on a remote server (a website). For example: UriSource ="https://docs.telerik.com/devtools/wpf/knowledge-base/images/kb-chartview-categorical-and-datetime-axis-0.png"
This could happen during the fetching of the image stream. In some cases, the server may give a NetworkStream or ConnectionStream, or similar Stream implementation, which keeps an open connection between the application and the server. If the connection get severed during the stream reading, an exception is thrown.
The exception message is: "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."
The stacktrace is:
Exception Info: System.Net.Sockets.SocketException
at System.Net.Sockets.NetworkStream.Read(Byte[], Int32, Int32)
Inner Exception:
Exception Info: System.IO.IOException
at System.Net.ConnectStream.Read(Byte[], Int32, Int32)
at System.IO.Stream.InternalCopyTo(System.IO.Stream, Int32)
at Telerik.Windows.Documents.Layout.ExtensionMethods.ToMemoryStream(System.IO.Stream)
at Telerik.Windows.Documents.Model.ImageInline.<SetStreamFromUriSource>b__0(System.Object, StreamReadyEventArgs)
at Telerik.Windows.Documents.Utils.ResourceStreamLocator.OnStreamReady()
at System.Net.WebClient.OnOpenReadCompleted(System.Net.OpenReadCompletedEventArgs)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
ArgumentExeption when typing a specific combination with the new Japanese IME.
Steps to reproduce:
Expected should work like in the standard text box.