# HeaderFooter.Distance Property

> Gets or sets the distance, in twips, of a header or footer to the top or bottom of the page. For headers it is the distance between the top of the header and the top of the page. For footers it is the distance between the bottom of the footer and the bottom of the page. The default value is 567 twips = 1 cm.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **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
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > HeaderFooter.Distance Property
- **450 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/distance-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/distance-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/distance-property/llms-full.txt

---

### Description

Gets or sets the distance, in twips, of a header or footer to the top or bottom of the page. For headers it is the distance between the top of the header and the top of the page. For footers it is the distance between the bottom of the footer and the bottom of the page. The default value is 567 twips = 1 cm.

### Syntax

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

```vbnet
Public Property Distance As Integer
```

### Examples

The following example places the header half an inch from the page edge.

```csharp
HeaderFooterCollection headers = textControl.Sections[1].HeadersAndFooters;
headers.Add(HeaderFooterType.Header);
HeaderFooter headerFooter = headers.GetItem(HeaderFooterType.Header);
headerFooter.Distance = 720;
```

```vbnet
Dim headers As HeaderFooterCollection = textControl.Sections(1).HeadersAndFooters
headers.Add(HeaderFooterType.Header)
Dim headerFooter As HeaderFooter = headers.GetItem(HeaderFooterType.Header)
headerFooter.Distance = 720
```

---

## Nearby

- **Previous:** [HeaderFooter.Deactivate Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/deactivate-method/llms-full.txt)
- **Next:** [HeaderFooter.DocumentLinks Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/documentlinks-property/llms-full.txt)
