# TextControl.FontSize Property

> Gets or sets the font size of the text control in device-independent units (1/96th inch). This is a dependency property.

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

---

### Description

Gets or sets the font size of the text control in device-independent units (1/96th inch). This is a dependency property.

### Syntax

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

```vbnet
Public Property FontSize() As Double
```

### Examples

The following example uses `TextControl.FontSize` to configure font size as part of the text control workflow. The configured value is checked before the workflow continues.

```csharp
textControl.FontSize = 1.0;
Console.WriteLine($"Font Size used by Text Control: {textControl.FontSize}");
```

```vbnet
textControl.FontSize = 1.0
Console.WriteLine($"Font Size used by Text Control: {textControl.FontSize}")
```

---

## Nearby

- **Previous:** [TextControl.FontSettings Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/fontsettings-property/llms-full.txt)
- **Next:** [TextControl.FontStyle Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/fontstyle-property/llms-full.txt)
