IsInheritedFromParagraph Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
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.
Syntax
public bool IsInheritedFromParagraph(InlineStyle.Attributes attributes);Public Function IsInheritedFromParagraph(attributes As InlineStyle.Attributes) As BooleanParameters
| 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.
Examples
The following example creates and configures a reusable inline style for the document by using InlineStyle.IsInheritedFromParagraph.
InlineStyle inlineStyle = new("Emphasis");
textControl.InlineStyles.Add(inlineStyle);
if (inlineStyle.IsInheritedFromParagraph(InlineStyle.Attributes.FontName))
{
Console.WriteLine("Is Inherited From Paragraph completed successfully.");
}Dim inlineStyle As New InlineStyle("Emphasis")
textControl.InlineStyles.Add(inlineStyle)
If inlineStyle.IsInheritedFromParagraph(InlineStyle.Attributes.FontName) Then
Console.WriteLine("Is Inherited From Paragraph completed successfully.")
End If