Remove Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Removes a header or footer from a Text Control document or from a certain section. To remove more than one header or footer a combination of the HeaderFooterType enumeration can be used.
Syntax
public bool Remove(HeaderFooterType headerFooterType);Public Function Remove(headerFooterType As HeaderFooterType) As BooleanParameters
| Parameter | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| headerFooterType | Specifies the headers and/or footers to remove. A combination of the following values are possible:
|
Return Value
The return value is true, if the header or footer could be removed. Otherwise it is false.
Examples
The following example removes an even-page header when the document no longer needs a separate variant.
HeaderFooterCollection headersAndFooters = textControl.Sections[1].HeadersAndFooters;
headersAndFooters.Add(HeaderFooterType.EvenHeader);
headersAndFooters.Remove(HeaderFooterType.EvenHeader);Dim headersAndFooters As HeaderFooterCollection = textControl.Sections(1).HeadersAndFooters
headersAndFooters.Add(HeaderFooterType.EvenHeader)
headersAndFooters.Remove(HeaderFooterType.EvenHeader)