# InlineStyle Class

> The InlineStyle class defines a formatting style that can be used to format single words in a line of text. In addition to the methods described here, it inherits all properties and methods of the FormattingStyle class.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 10.1
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Inherits:** `TXTextControl.FormattingStyle`
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > InlineStyle Class
- **2438 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/inlinestyle/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/inlinestyle/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/inlinestyle/llms-full.txt

---

### Description

The InlineStyle class defines a formatting style that can be used to format single words in a line of text. In addition to the methods described here, it inherits all properties and methods of the [FormattingStyle](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/formattingstyle/llms-full.txt) class.

### Syntax

```csharp
public sealed class InlineStyle : FormattingStyle
```

```vbnet
Public NotInheritable Class InlineStyle
    Inherits FormattingStyle
```

### Examples

The following example shows how to add and apply an InlineStyle.

```csharp
textControl1.Text = "TX Text Control";

TXTextControl.InlineStyle inline = new TXTextControl.InlineStyle("ArialBold16");
inline.Bold = true;
inline.FontSize = 320;
inline.FontName = "Arial";
textControl1.InlineStyles.Add(inline);

textControl1.Select(3, 4);
textControl1.Selection.FormattingStyle = "ArialBold16";
```

```vbnet
TextControl1.Text = "TX Text Control"

Dim inline As TXTextControl.InlineStyle = New TXTextControl.InlineStyle("ArialBold16")
inline.Bold = True
inline.FontSize = 320
inline.FontName = "Arial"
TextControl1.InlineStyles.Add(inline)

TextControl1.Select(3, 4)
TextControl1.Selection.FormattingStyle = "ArialBold16"
```

The following example creates and configures a reusable inline style for the document.

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

```vbnet
Dim inlineStyle As New InlineStyle("Emphasis")
textControl.InlineStyles.Add(inlineStyle)
```

---

## In This Section

- [InlineStyle.Attributes Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/inlinestyle/attributes-enumeration/llms-full.txt): Determines the style's attributes. This enumeration is used with the IsInheritedFromParagraph and ResetToParagraph methods.
- [InlineStyle Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/inlinestyle/constructor/llms-full.txt): Creates a new instance of the InlineStyle class.
- [InlineStyle.IsInheritedFromParagraph Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/inlinestyle/isinheritedfromparagraph-method/llms-full.txt): 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.
- [InlineStyle.ResetToParagraph Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/inlinestyle/resettoparagraph-method/llms-full.txt): Resets one or more of the style's attributes to its default value which is the same value as defined for 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.

---

## Nearby

- **Previous:** [ImageInsertionMode Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/imageinsertionmode/enumeration/llms-full.txt)
- **Next:** [InlineStyle.Attributes Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/inlinestyle/attributes-enumeration/llms-full.txt)
