# FormattingStyle Class

> The FormattingStyle class is the base class for the InlineStyle and ParagraphStyle classes. It implements the functionality common to all formatting styles.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **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
- **Derived:** `TXTextControl.InlineStyle`, `TXTextControl.ParagraphStyle`
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > FormattingStyle Class
- **1330 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/llms-full.txt

---

### Description

The FormattingStyle class is the base class for the [InlineStyle](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/inlinestyle/llms-full.txt) and [ParagraphStyle](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/paragraphstyle/llms-full.txt) classes. It implements the functionality common to all formatting styles.

### Syntax

```csharp
public class FormattingStyle
```

```vbnet
Public Class FormattingStyle
```

### Examples

The following example creates a reusable emphasis style and adds it to the document.

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

```vbnet
Dim formattingStyle As FormattingStyle = New InlineStyle("Emphasis")
textControl.InlineStyles.Add(DirectCast(formattingStyle, InlineStyle))
```

---

## In This Section

- [FormattingStyle.Apply Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/apply-method/llms-full.txt): Applies all set attributes of the style to the current document.
- [FormattingStyle.AutoBaseline Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/autobaseline-property/llms-full.txt): Gets or sets values specifying automatic sub- or superscripted text. When using automatic sub- and superscript the font is scaled and moved above or below the baseline with values defined through the font itself. Automatic sub- and superscript can be combined with a user-defined baseline which can be set with the Baseline property.
- [FormattingStyle.Baseline Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/baseline-property/llms-full.txt): Gets or sets a user-defined baseline alignment, in twips, of the style. Positive values moves the baseline to superscript, negative values move the baseline to subscript.
- [FormattingStyle.BaseStyle Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/basestyle-property/llms-full.txt): Gets the FormattingStyle which is the base style of this style. If this style is the TextControl's root style this property returns null. The property's value can be either a ParagraphStyle or an InlineStyle.
- [FormattingStyle.Bold Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/bold-property/llms-full.txt): Gets or sets the bold attribute of the style.
- [FormattingStyle.Capitals Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/capitals-property/llms-full.txt): Gets or sets values specifying wheather lowercase letters are displayed with capital letters. Lowercase letters are displayed either with capital letters of the same size or with capital letters which have a smaller size. The smaller size is either the size of the lowercase 'x' (petite caps) or the size of the lowercase 'x' + 10% (small caps).
- [FormattingStyle.CharacterScaling Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/characterscaling-property/llms-full.txt): Gets or sets the style's character scaling, in percent of the average character width.
- [FormattingStyle.CharacterSpacing Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/characterspacing-property/llms-full.txt): Gets or sets the style's character spacing value, in twips. This value is added to each character. When it is negative, character spacing is reduced, otherwise it is extended.
- [FormattingStyle.Culture Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/culture-property/llms-full.txt): Gets or sets the style's culture. When this property is null, the style has the neutral culture.
- [FormattingStyle.FontName Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/fontname-property/llms-full.txt): Gets or sets the font of the style.
- [FormattingStyle.FontSize Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/fontsize-property/llms-full.txt): Gets or sets the font's size of the style.
- [FormattingStyle.ForeColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/forecolor-property/llms-full.txt): Gets or sets the style's color used to display the text.
- [FormattingStyle.Italic Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/italic-property/llms-full.txt): Gets or sets the italic attribute of the style.
- [FormattingStyle.Name Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/name-property/llms-full.txt): Gets or sets the name of the style.
- [FormattingStyle.Strikeout Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/strikeout-property/llms-full.txt): Gets or sets the strikeout attribute of the style.
- [FormattingStyle.TextBackColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/textbackcolor-property/llms-full.txt): Gets or sets the style's text background color.
- [FormattingStyle.Underline Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/underline-property/llms-full.txt): Gets or sets underlining styles for the style.

---

## Nearby

- **Previous:** [FootnoteText.TextFrames Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/footnotetext/textframes-property/llms-full.txt)
- **Next:** [FormattingStyle.Apply Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/formattingstyle/apply-method/llms-full.txt)
