We have a legacy system that generates RTF using some native RTF controls. The RTF generated by this application is compatible with MS wordpad. But seems that the RadRichTextBox is not compatible. The problem is when we use bullets.
Consider we create an RTF with bullets, using legacy -
* Legacy Bullet 1
* Legacy Bullet 2
* Legacy Bullet 3
Then, this is the RTF that is generated -
{\rtf1\fbidis\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 Segoe UI;}{\f1\fnil\fcharset0 Arial;}{\f2\fnil\fcharset2 Symbol;}}
{\colortbl ;\red0\green0\blue0;}
\viewkind4\uc1\pard\ltrpar\cf1\lang1033\f0\fs22\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\ltrpar\fi-200\li200\tx360 Legacy Bullet 1\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\ltrpar\fi-200\li200\tx360\tx360 Legacy Bullet 2\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\ltrpar\fi-200\li200\tx360\tx360\tx360 Legacy Bullet 3\par
\pard\ltrpar\tx360\tx360\tx360\par
\f1\par
}
----------------------------------------------------------------------
Now, if we open this RTF in Wordpad, then the bullets are displayed correctly.
But the bullets are not displayed when we bind the RTF to RadRichTextBox.
It displays something like this -
Legacy Bullet 1
Legacy Bullet 2
Legacy Bullet 3
And after binding the original RTF, if we now try to get the RTF this is how it looks like -
{\rtf\ansi\ansicpg1252\uc1\deff0\deflang1033{\fonttbl{\f0 Verdana;}{\f1 Segoe UI;}{\f2 Arial;}}{\colortbl\red0\green0\blue0 ;;}{\*\defchp\ltrch\f0\fs24\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone}{\*\defpap\sl276\slmult1\sa180}{\stylesheet{\s0\sqformat\spriority0\ltrch\f0\fs24\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\sl276\slmult1 Normal;}{\*\ts2\tsrowd\spriority59\trbrdrt\brdrnone\trbrdrb\brdrnone\trbrdrl\brdrnone\trbrdrr\brdrnone\trbrdrh\brdrnone\trbrdrv\brdrnone\trgaph0\clpadft3\clpadt0\clpadfr3\clpadr0\clpadfl3\clpadl0\clpadfb3\clpadb0\tsvertalt\ltrch\f0\fs24\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\sl276\slmult1 Table Normal;}}\nouicompat\viewkind4\paperw12240\paperh15840\margl1425\margr1425\margt1425\margb1425\deftab720\sectd\pgwsxn12240\pghsxn15840\marglsxn1425\margrsxn1425\margtsxn1425\margbsxn1425\headery720\footery720\pard\s0\ltrpar\sl240\slmult1{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\par}\pard\s0\ltrpar\tx360\sl240\slmult1\li200\lin200\fi-200{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone Legacy Bullet 1}{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\par}\pard\s0\ltrpar\tx360\sl240\slmult1\li200\lin200\fi-200{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone Legacy Bullet 2}{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\par}\pard\s0\ltrpar\tx360\sl240\slmult1\li200\lin200\fi-200{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone Legacy Bullet 3}{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\par}\pard\s0\ltrpar\tx360\sl240\slmult1{\ltrch\f1\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\par}\pard\s0\ltrpar\tx360\sl240\slmult1{\ltrch\f2\fs22\i0\b0\strike0\cf0\cb1\highlight1\ulc0\ulnone\par}}
-Amul.
When an enter is pressed the paragraph is split into two parts and does not apply the current editing style to the formatting symbol of the first part. Steps to reproduce: Add text to an empty paragraph. Increase the font-size. Press enter. Expected result: If the user starts to write the text should have its font properties from the current editing style. Expected result 2: If the client moves the caret around and then return to the beginning of the second paragraph it and start writing, the text should have its font properties from the formatting symbol(which are applied from current editing style when the paragraph has been split).
When the preferred width of the table is set to a percentage value and the columns inside have preferred width values in pixels, the bigger width should take precedence when showing the table. At this point, the table column widths are with higher priority.
RadRichTextBox/RadDocumentEditor's MailMerge(bool) method doesn't respect the startEachRecordOnNewPage parameter. When the parameter is set to 'false', records are still merged on different pages, instead of on one. Workaround: Use RadDocumentMerger to append the resultant documents: http://docs.telerik.com/devtools/wpf/controls/radrichtextbox/features/merge-documents/append
Currently exported DOCX document may be visualized by MS Word with different highlight colors. There is a limitation in the document format which RadRichTextBox doesn't respect, and this could be avoided by unifying the palette in RichTextBox's UI with the one in MS Word. In RadRichTextBox, the highlight color picker has more colors than the one in MS Word. That is why when exporting paragraph with one of the additional colors, MS Word (the DOCX format) won't use it but will fallback to one of the available colors.
When the control is used in NoXaml scenario and the required resources are merged in the resources of the Window/UserControl containing RadRichTextBox, XamlParseException is thrown at runtime with a message "Cannot find resource named 'thumbStroke'."
or
the App.Current.Resources.MergedDictionaries is cleared.
Workaround: Merge Telerik.Windows.Documents.xaml and Telerik.Windows.Controls.RichTextBoxUI.xaml in App.xaml.
or
Merge the resourced before initializing RadRichTextBox:
App.Current.Resources.MergedDictionaries.Add(new ResourceDictionary()
{
Source = new Uri("/Telerik.Windows.Documents;component/Themes/Styles/ImageAdornerUIResourcesDictionary.xaml", UriKind.RelativeOrAbsolute)
});
Fix available in R3 2017 Official Release version.
Current implementation of Text UI automation pattern doesn't support obtaining the attributes of the selection, e.g. bold, italic, etc.
The API allows returning custom ITextRangeProvider where the behavior could be implemented , but this requires a lot of work.
If this is built-in, the API will allow getting the attributes as follows:
var automationPeer = (RadRichTextBoxAutomationPeer)FrameworkElementAutomationPeer.FromElement(this.radRichTextBox);
TextPattern textPattern = (TextPattern)automationPeer.GetPattern(PatternInterface.Text);
object isItalic = textPattern.GetSelection()[0].GetAttributeValue(TextPattern.IsItalicAttribute);
if (isItalic == TextPattern.MixedAttributeValue)
{
// mixed
}
else
{
bool italic = (bool)isItalic;
}
Currently, AutomationElement.NotSupported is always returned.
These tags define deleted and inserted content to markup updates and modifications in a document. They can be used to export the revisions of a document when Track Changes is enabled.
In Word and WordPad when hitting Ctrl+Down Arrow the cursor moves to the start of the next paragraph, until the last paragraph in the document where it moves to the end of the document. In Telerik editor it moves to the end of the paragraph. Steps to reproduce: - Load a document with multiple lines of text - Click near the top of the document and hit Ctrl+Down repeatedly Expected: The cursor moves down one paragraph at a time with the cursor at the start of the paragraph Actual: The cursor moves down one paragraph at a time with the cursor at the end of the paragraph Fix available in LIB Version 2017.3.1218.
Currently, blockquote tags are imported as paragraphs. Change the mechanism so they can be imported as citations.
Mail merge is not working for the first record in the items source when the items source is IEnumerable with deferred execution. Workaround: convert the collection to list.
Implement support for the SET field.
"Win32Exception (0x80004005): Not enough storage is available to process this command" is thrown when multiple RadDocument instances are created in background threads.
This is due to the fact that RadDocument contains MailMergeDataSource object, which is DependencyObject. When multiple dependency objects are created in different threads, they are not property freed by thread's Dispatcher.
Workaround 1: Microsoft provided workaround in a bug report here:
https://connect.microsoft.com/VisualStudio/feedback/details/620588/system-componentmodel-win32exception-0x80004005-not-enough-storage-is-available-to-process-this-command , namely:
------------------------------
Put the following code:
Dispatcher dispatcher = Dispatcher.CurrentDispatcher;
dispatcher.BeginInvokeShutdown(DispatcherPriority.Normal);
Dispatcher.Run();
anywhere in the background thread processing the RadDocument.
-----------------------------
Workaround 2: Use pooling of the used threads. The problem is that Task Parallel Library (which has built-in pooling) does not use STA threads by default, but this can be achieved by using custom TaskScheduler (attached, the code is get from here: https://code.msdn.microsoft.com/ParExtSamples ):
var parallelOptions = new ParallelOptions()
{
TaskScheduler = new StaTaskScheduler(Environment.ProcessorCount)
};
Parallel.For(0, 10000, parallelOptions, cc =>
{
var document = new DocxFormatProvider().Import(data);
byte[] pdfBytes = new PdfFormatProvider().Export(document);
};
Using Microsoft Pinyin IME for typing in the RichTextBox causes FatalExecutionEngineError exception.
The content of the table cells seems to be rendered in the correct position while the borders are drawn above the continues section break.
RichTextBox interprets the div tag by adding a new line upon its closing. However, when the content of the div tag is a br tag, the whole combination should be treated as one new line.
At the moment the table properties, including table, table row and table cell properties don't have size validation, i.e. it is possible to set them to negative or zero values. Validation should be added where necessary.
Certain documents containing a table with a cell spanning on more than one row might cause the application to hang and throw OutOfMemoryException. Workaround: Set SpacingAfter = 0 of the last paragraph in the table.
Add the following code to an application with a RadRichTextBox in it:
for (var i = 0; i < 1000; i++)
{
var doc = radRichTextBox.Document.CreateDeepCopy();
}
If your document does not contain any lists it behaves as expected: memory usage increases until the next GC when it is collected. If there are lists in your document the RadDocument instances created by CreateDeepCopy are never collected and your app will run out of memory.
Fix available in LIB Version 2018.3.1029.
Implement import and export of OpenDocument files (.odt).