Applying negative LeftIndent or FirstLineIndent of a paragraph in web layout mode will visualize the paragraph to the left of RadRichTextBox boundaries.
When classes inheriting RadDocument are exported using XamlFormatProvider, XmlException with message "The prefix 't' cannot be redefined from 'clr-namespace:Telerik.Windows.Documents.Model;assembly=WpfApplication1' to 'clr-namespace:Telerik.Windows.Documents.Model;assembly=Telerik.Windows.Documents' within the same start element tag." is thrown Similar scenario works with inheriting other elements. Steps to reproduce: 1. Create an object which inherits the RadDocument 2. Pass the created object as a parameter for the XamlFormatProvider.Export() method Observe: An XmlException is thrown Expected: The object to be exported
When trying to export a document which contains hyperlink pasted from Outlook, KeyNotFoundException is thrown. The color of the span is not registered. To work around this, register a style with the same color: StyleDefinition style = new StyleDefinition("test", StyleType.Character); style.SpanProperties.ForeColor = Color.FromArgb(100, 200, 25, 104); this.radRichTextBox.Document.StyleRepository.Add(style);
Loading/editing document with large lists (with 1561 or more items) throws IndexOutOfRangeException when incorrectly tries to convert numbering to letters. Workaround: Change list type to one which does not include letter NumberingFormat in any of its levels, for example Numbered Hierarchical or custom one.
Introduce an option enabling only proportional resizing to be allowed in the ImageSelectionAdorner (side middle thumbs should be disabled). The option can be added in the RadRichTextBox's ImageSelectionAdornerSettings as it already contains CanRotate, CanDrag, CanResize. Note that Images could also support Lock aspect ratio property, which is different.
When the caret is positioned at the beginning of a paragraph with hanging indent and the user press Backspace, the left indent is set to a negative value, the text goes out of the bounds of the document. Workaround: Use the editor's method instead of the command: private void RadRichTextBox_CommandExecuting(object sender, CommandExecutingEventArgs e) { bool? parameter = e.CommandParameter as bool?; if (parameter != null && parameter == true) { DeleteCommand command = e.Command as DeleteCommand; if (command != null) { e.Cancel = true; this.radRichTextBox.Delete(true); } } }
An useful option would be to export the text without the bullets in it.
The ChangeListStyleCommand has an event named ListStyleChangedChanged which is never raised.
Currently, when an option is chosen from the drop-downs in Page Layout -> Page Setup -> Size/Margin/Orientation/Columns, the command is executed, but the item corresponding to the current value is not selected. For example, if the caret is in a Section with A3 size, Size -> drop-down -> A3 should be selected.
When the specified length of the stream is larger than the actual one, Adobe throws errors and removes the image. Workaround: Set the format provider settings: PdfFormatProvider provider = new PdfFormatProvider(); PdfExportSettings exportSettings = new PdfExportSettings(); exportSettings.ContentsDeflaterCompressionLevel = 9; exportSettings.ImagesDeflaterCompressionLevel = 9; provider.ExportSettings = exportSettings;
If span formatting command (bold, italic, strikethrough) is applied to selection over multiple paragraphs, and tracked with tracked changes; and later this tracked change is rejected, NullReferenceException is thrown. The exception is handled so the visible result for the end user is that the UI stops updating and any subsequent changes are not visible.
HtmlFormatProvider cannot import a document that contains an image with invalid URI format. An UriFormatException is thrown and the whole import fails. Similar errors should be handled and the document should be imported.
Currently, colors with alpha channel defined with 'rgba' function are not supported, for example the following: <span style="background-color: rgba(0, 0, 0, 0.5);">Some text</span> is imported as black color; semi-transparent colors are exported without the alpha channel.
When header/footer (HeaderFooterPresenterBase) is rendered, the model which corresponds to it (HeaderFooterBase's Body property) is not updated. The result is updated only in the presenter. Thus, when exporting the document or when checking the elements in the model, the value of the inline (span's text) is not updated. Workaround: Update the fields in the headers/footers. RadDocumentEditor.UpdateAllFields() method can be used. Note that it works only for the main document and not its child documents, so different RadDocumentEditors should be created for each header/footer document.
Images with display: none could be made not-visible in the UI. The other elements could be skipped and not imported.
Workaround: Manipulate the clipboard content in CommandExecuting even handler: private void RichTextBox_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e) { if (e.Command is PasteCommand) { DocumentFragment document = ClipboardEx.GetDocument(); bool hasChangedDocument = false; foreach (FieldRangeStart fieldStart in document.EnumerateChildrenOfType<FieldRangeStart>()) { foreach (Span span in fieldStart.Field.GetFragmentByDisplayMode(FieldDisplayMode.Code).EnumerateChildrenOfType<Span>()) { span.ForeColor = Colors.Black; hasChangedDocument = true; } } if (hasChangedDocument) { ClipboardEx.SetDocument(document); } } }
Actually, when we go to image editor from the RadRichTextBox, we've got the original image's size but not the width and height in the document. When we need to format pictures of a document with equal size, we are using the document's size, not the picture's size. Thanks
The caret of RadRichTextBox appears only when the text is selected. Once you try to reorder the letters within its content, it appears. The issue is caused when ScrollViewer control has different than the default style for the corresponding theme and there are set Padding and/or Margin properties. Workaround: the template of the Caret should be edited and Style="{x:Null}" should be set on the ScrollViewer which is defined inside the Caret control template.