Informs about whether one or more of the style's attributes are inherited from the surrounding paragraph. Text formatted through an inline style has all the attributes defined through the surrounding paragraph except the attributes explicitly defined through the inline style.


public bool IsInheritedFromParagraph(InlineStyle.Attributes attributes);
Public Function IsInheritedFromParagraph(ByVal attributes As InlineStyle.Attributes) As Boolean


Parameter Description
attributes Specifies one or more attributes. It can be a bitwise combination of values from the Attributes enumeration contained in this class.

Return Value

The return value is true, if the specified attributes are inherited from the paragraph. Otherwise it is false.


The following example shows how to use the 'IsInheritedFromParagraph' method. Here it used to check if the 'FontName' of the surrounding paragraph is inherited.If not, it is set to '"Arial"'.

textControl1.Text = "TX Text Control";

TXTextControl.InlineStyle inline = new TXTextControl.InlineStyle("ArialBold16");

if (inline.IsInheritedFromParagraph(TXTextControl.InlineStyle.Attributes.FontName) == false) {
    inline.FontName = ("Arial");

inline.FontSize = 16;
inline.ForeColor = System.Drawing.Color.DarkBlue;
inline.Italic = false;

TextControl1.Text = "TX Text Control"
Dim inline As TXTextControl.InlineStyle = New TXTextControl.InlineStyle("ArialBold16")

If inline.IsInheritedFromParagraph(TXTextControl.InlineStyle.Attributes.FontName) = False Then
   inline.FontName = ("Arial")
End If

inline.FontSize = 16
inline.ForeColor = System.Drawing.Color.DarkBlue
inline.Italic = False