# InlineStyle.IsInheritedFromParagraph Method

> 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.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 10.1
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > InlineStyle.IsInheritedFromParagraph Method
- **586 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inlinestyle/isinheritedfromparagraph-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inlinestyle/isinheritedfromparagraph-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inlinestyle/isinheritedfromparagraph-method/llms-full.txt

---

### 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

```csharp
public bool IsInheritedFromParagraph(InlineStyle.Attributes attributes);
```

```vbnet
Public Function IsInheritedFromParagraph(attributes As InlineStyle.Attributes) As Boolean
```

### Parameters

| 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`.

```csharp
InlineStyle inlineStyle = new("Emphasis");
textControl.InlineStyles.Add(inlineStyle);

if (inlineStyle.IsInheritedFromParagraph(InlineStyle.Attributes.FontName))
{
    Console.WriteLine("Is Inherited From Paragraph completed successfully.");
}
```

```vbnet
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
```

---

## Nearby

- **Previous:** [InlineStyle Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inlinestyle/constructor/llms-full.txt)
- **Next:** [InlineStyle.ResetToParagraph Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inlinestyle/resettoparagraph-method/llms-full.txt)
