# FormattingStyle.FontSize Property

> Gets or sets the font's size of the style.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 10.1
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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 Server > Reference > TXTextControl > FormattingStyle.FontSize Property
- **411 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formattingstyle/fontsize-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formattingstyle/fontsize-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formattingstyle/fontsize-property/llms-full.txt

---

### Description

Gets or sets the font's size of the style.

### Syntax

```csharp
public int FontSize { get; set; }
```

```vbnet
Public Property FontSize As Integer
```

### Examples

The following example creates a reusable emphasis style and adds it to the document by using `FormattingStyle.FontSize`.

```csharp
FormattingStyle formattingStyle = new InlineStyle("Emphasis");

formattingStyle.FontSize = 10;
Console.WriteLine($"Font Size used by Formatting Style: {formattingStyle.FontSize}");

textControl.InlineStyles.Add((InlineStyle)formattingStyle);
```

```vbnet
Dim formattingStyle As FormattingStyle = New InlineStyle("Emphasis")

formattingStyle.FontSize = 10
Console.WriteLine($"Font Size used by Formatting Style: {formattingStyle.FontSize}")

textControl.InlineStyles.Add(DirectCast(formattingStyle, InlineStyle))
```

---

## Nearby

- **Previous:** [FormattingStyle.FontName Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formattingstyle/fontname-property/llms-full.txt)
- **Next:** [FormattingStyle.ForeColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formattingstyle/forecolor-property/llms-full.txt)
