For example, if the document has "Times New Roman" as a default font family, the "TableNormal" style doesn't have set that property and there is a Table element in the header - the value is not properly obtained ("Verdana" is applied, which is the default value for that Span property). The problem is observed for all default span style properties. Workaround: Change the table style by setting the necessary properties from the default style. For example for the font family: object documentFontFamilyPropertyValue = this.radRichTextBox.Document.Style.GetPropertyValue(Span.FontFamilyProperty); foreach (StyleDefinition tableStyle in this.radRichTextBox.Document.StyleRepository.Where(s => s.Type == StyleType.Table && s.BasedOn == null)) { StylePropertyBase styleProperty = tableStyle.GetProperty(Span.FontFamilyProperty); if (styleProperty.ValueSource == RadValueSource.Default) { tableStyle.SetPropertyValue(Span.FontFamilyProperty, documentFontFamilyPropertyValue); } }
In MS Word, images can have strikethrough formatting. In RadDocument's model, this is property of Spans only.
To reproduce:
- Add a multilevel list to a document and export it to HTML
- Import the document again the list is changed and the values are not correct.
The document styles are not respected because of wrongly imported custom style name after copy-paste from MS Word and exported to HTML.
Workaround: avoid using styles with braces in their name.
When trying to export a document containing InlineUIContainer inside a read-only range, the XamlWriter.Save() method that is used in XamlFormatProvider.Serialize() throws StackOverflow exception. Sample code to reproduce the exception: InlineUIContainer container = new InlineUIContainer(); Button btn = new Button(); btn.Content = "Sample Button"; btn.Width = 70; btn.Height = 30; container.UiElement = btn; ReadOnlyRangeStart start = new ReadOnlyRangeStart(); ReadOnlyRangeEnd end = new ReadOnlyRangeEnd(); end.PairWithStart(start); this.rtb.InsertInline(container); this.rtb.Document.Selection.SelectAll(); this.rtb.InsertAnnotationRange(start, end); XamlFormatProvider provider = new XamlFormatProvider(); string content = provider.Export(this.rtb.Document); File.WriteAllText(@"c:\temp\asd.xaml", content);
As a user, I'd like to have a way to determine what document elements or layout boxes are in the view port. I may need them in order to: - Modify something else in the UI depending on them. For example, if a hyperlink or bookmark is scrolled in the viewport, enable buttons outside RichTextBox that execute specific actions. - Implement formatting changes to the visible elements only in scenarios like a code editor. Right now, the only way to obtain the visible boxes is to implement a UI layer, however, layers are intended for scenarios in which you'd like to modify the presentation of the control's content and may not be a good idea to utilize them for formatting changes or other actions.
When RadRichTextBox (in Paged layout mode) is in RadTabItem in RadTabControl, ribbon UI buttons and keyboard bindings are not working. Workaround: Use System's TabControl instead of the RadTabControl.
I have tried to use the RichTextBox, but found that it does not work very well when it comes to measure the text. This results in clipped text and that the caret can be displayed in a different place then expected. This can easily be seen with a font like Gabriola, which uses complex kerning metrics. Type a text with a lot of "ff" and "fi" and you will soon see that your caret gets out of sync and that text is sometimes clipped. When I look at the code of RichTextBox it seems to me that it uses its own calculation of text widths and that the this is based on a very simple method using just the kerning information. There is also a hard coded list containing information which fonts that has kerning info and which fonts that are mono spaced. It seems strange to me to have this in a config file since there is a large number of fonts used by the users. It also seem to look at the Unicode character family in order to determine if ligatures are used or not, which is also quite strange since ligatures can be used for western characters too. The font Gabriola is an example of this. Look at "fi" in a word like "fine". It can potentially consume a lot of memory since I think that it builds a dictionary of the kerning of all pairs of characters for all fonts that it encounters. I guess this way of doing things were made for performance, but unfortunately, good performance doesn't help much if it doesn't work. I am not sure if I should report this as a bug, since it is more of a fatal design issue of the whole control.
Incorrect behavior when setting the table cells padding
Steps to reproduce:
- Insert a table
- Open Table Properties
- Clear the value in the "Left" field
- Check "Same for all sides"
- Click OK
Korean language input does not work correctly on Windows 11 versions after 22H2 (OS Build 22621.1265).
This is related to an update to the Microsoft Input Method Editor (IME). The workaround is to enable the "Previous version of Microsoft IME" (check the attached screenshots for the steps).
KeyNotFoundException is thrown when loading a document with a custom bibliographic style applied.
As a workaround, you can change the current bibliographic style to one of the predefined styles before the export of the document.
...
this.radRichTextBox.CommandExecuting += RadRichTextBox_CommandExecuting;
...
...
private void RadRichTextBox_CommandExecuting(object sender, CommandExecutingEventArgs e)
{
if (e.Command is SaveCommand)
{
this.radRichTextBox.ChangeBibliographicStyle(new APAFifthEditionStyle());
}
}
If the font applied to text doesn't contain Bold or Italic typefaces, the text at the end of the line is clipped. Workaround: Switch to the old rendering mode (which is somewhat slower): this.radRichTextBox.TextRenderingMode = TextBlockRenderingMode.TextBlockWithPropertyCaching;
Spell check does not refresh correctly when there are annotation markers around the current word.