# HeaderFooter Class

> An instance of the HeaderFooter class represents a header or footer in a Text Control document. A header or footer can be obtained through the TextControl.HeadersAndFooters or through the Section.HeadersAndFooters property. The collection obtained through the TextControl.HeadersAndFooters property contains headers and footers which are common to all sections of the document. If a header or footer is added to this collection all sections of the document have the same header or footer. These headers and footers are connected, which means that changing the contents of such a header or footer also changes the content of all other section's headers or footers. The HeaderFooter.ConnectedToPrevious property of these headers and footers is set to true. The collection obtained through the Section.HeadersAndFooters property contains headers and footers which are single to this section. Changing the contents of such a header or footer does not change the contents of other headers and footers.

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

---

## On This Page

- [Description](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/#description)
- [Syntax](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/#syntax)
- [Examples](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/#examples)
- [Members](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/#members)

---

## In This Section

- [HeaderFooter.Activate Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/activate-method/llms.txt): Activates a header or a footer.
- [HeaderFooter.AddUndoUnit Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/addundounit-method/llms.txt): Adds the current state of the header or footer to the undo stack. Programmatic changes performed with the header's or footer's properties and methods are not automatically added to a TextControl's undo stack. Calling this method is not necessary, when the header's or footer's text and/or formatting is changed.
- [HeaderFooter.ApplicationFields Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/applicationfields-property/llms.txt): Gets a collection of all Microsoft Word or Heiler HighEdit fields that have been created or imported from a Microsoft Word or RTF document. The property value is an object of the type ApplicationFieldCollection. Before loading a document the LoadSettings.ApplicationFieldFormat property must be set, otherwise this collection is empty.
- [HeaderFooter.Barcodes Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/barcodes-property/llms.txt): Gets a collection of all barcodes contained in a header or footer. The property value is an object of the type DataVisualization.BarcodeCollection. The collection can be used to get or to alter a barcode's attributes and to add barcodes to or to remove barcodes from a header or footer.
- [HeaderFooter.Charts Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/charts-property/llms.txt): Gets a collection of all charts contained in a header or footer. The property value is an object of the type DataVisualization.ChartCollection. The collection can be used to get or to alter a chart's attributes and to add charts to or to remove charts from a header or footer.
- [HeaderFooter.Comments Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/comments-property/llms.txt): Gets a collection of all comments in the header or footer. The property's value is an object of the type CommentCollection.
- [HeaderFooter.ConnectedToPrevious Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/connectedtoprevious-property/llms.txt): Gets or sets a value specifying whether the header or footer is connected with the header or footer of the previous section. If headers or footers are connected, they have always the same contents.
- [HeaderFooter.Deactivate Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/deactivate-method/llms.txt): Deactivates a header or a footer.
- [HeaderFooter.Distance Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/distance-property/llms.txt): 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.
- [HeaderFooter.DocumentLinks Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/documentlinks-property/llms.txt): Gets a collection of all links in a header or footer which point to targets in the same document. The property value is an object of the type DocumentLinkCollection.
- [HeaderFooter.DocumentTargets Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/documenttargets-property/llms.txt): Gets a collection of all targets in a header or footer. The property value is an object of the type DocumentTargetCollection.
- [HeaderFooter.Drawings Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/drawings-property/llms.txt): Gets a collection of all drawings contained in a header or footer. The property value is an object of the type DataVisualization.DrawingCollection. The collection can be used to get or to alter a drawing's attributes and to add drawings to or to remove drawings from a header or footer.
- [HeaderFooter.EditableRegions Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/editableregions-property/llms.txt): Gets a collection of all editable regions in the header or footer. The property's value is an object of the type EditableRegionCollection.
- [HeaderFooter.Find Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/find-method/llms.txt): Finds a text string in a header or footer.
- [HeaderFooter.FormFields Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/formfields-property/llms.txt): Gets a collection of all form fields contained in a header or footer. The property's value is an object of the type FormFieldCollection.
- [HeaderFooter.Frames Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/frames-property/llms.txt): Gets a collection of all images, textframes, charts, barcodes and drawings in a header or footer. The property value is an object of the type FrameCollection. The collection can be used to get or to alter common attributes.
- [HeaderFooter.GetTextFields Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/gettextfields-method/llms.txt): Returns a collection containing text fields of the specified types.
- [HeaderFooter.HypertextLinks Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/hypertextlinks-property/llms.txt): Gets a collection of all hypertext links the header or footer contains. The property's value is an object of the type HypertextLinkCollection.
- [HeaderFooter.Images Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/images-property/llms.txt): Gets a collection of all images the header or footer contains. The property value is an object of the type ImageCollection.
- [HeaderFooter.Lines Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/lines-property/llms.txt): Gets a collection of all text lines the header or footer contains. The property value is an object of the type LineCollection.
- [HeaderFooter.MisspelledWords Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/misspelledwords-property/llms.txt): Gets a collection of all misspelled words the header or footer contains. The property value is an object of the type MisspelledWordCollection.
- [HeaderFooter.PageNumberFields Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/pagenumberfields-property/llms.txt): Gets a collection of page number fields in the header or footer. The property's value is an object of the type PageNumberFieldCollection.
- [HeaderFooter.Paragraphs Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/paragraphs-property/llms.txt): Gets a collection of all paragraphs the header or footer contains. The property value is an object of the type ParagraphCollection.
- [HeaderFooter.SectionNumber Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/sectionnumber-property/llms.txt): Returns the number of the section to which the header or footer belongs. The sections of the document are numbered beginning with 1. This property returns zero, if the header or footer object does not represent a single header or footer.
- [HeaderFooter.Selection Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/selection-property/llms.txt): Gets or sets the current selection in a header or footer. The property value is an object of the type Selection. For more information see the description of the Selection class.
- [HeaderFooter.SubTextParts Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/subtextparts-property/llms.txt): Gets a collection of all subtextparts in the header or footer. The property's value is an object of the type SubTextPartCollection.
- [HeaderFooter.Tables Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/tables-property/llms.txt): Gets a collection of all tables in the header or footer. The property's value is an object of the type TableCollection.
- [HeaderFooter.TablesOfContents Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/tablesofcontents-property/llms.txt): Gets a collection of all tables of contents in the header or footer. The property's value is an object of the type TableOfContentsCollection.
- [HeaderFooter.TextChars Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/textchars-property/llms.txt): Gets a collection of all characters the header or footer contains. The property value is an object of the type TextCharCollection.
- [HeaderFooter.TextFields Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/textfields-property/llms.txt): Gets a collection of all standard text fields in the header or footer. The property's value is an object of the type TextFieldCollection.
- [HeaderFooter.TextFrames Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/textframes-property/llms.txt): Gets a collection of all text frames contained in a header or footer. The property value is an object of the type TextFrameCollection.
- [HeaderFooter.TrackedChanges Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/trackedchanges-property/llms.txt): Gets a collection of all changes made in the header or footer. The property's value is an object of the type TrackedChangeCollection.
- [HeaderFooter.Type Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/type-property/llms.txt): Gets the type of the header or footer. It is a value of the HeaderFooterType enumeration.

---

## Nearby

- **Previous:** [FrameStyle Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/framestyle/enumeration/llms.txt)
- **Next:** [HeaderFooter.Activate Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/headerfooter/activate-method/llms.txt)
