Last Updated: 31 Oct 2018 08:11 by ADMIN
Created on: 02 Mar 2016 16:45
Category: RichTextBox
Type: Bug Report
RichTextBox: Text does not inherit style properties from document DefaultStyle when it is inside table and the table is in header or footer
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);
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)