Deactivate Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Deactivates a header or a footer.
Syntax
public bool Deactivate();Public Function Deactivate() As BooleanReturn Value
The return value is true, if the header or footer could be deactivated. Otherwise it is false.
Examples
The following example creates a header for the first section and configures its content or layout by using HeaderFooter.Deactivate.
HeaderFooterCollection headers = textControl.Sections[1].HeadersAndFooters;
headers.Add(HeaderFooterType.Header);
HeaderFooter headerFooter = headers.GetItem(HeaderFooterType.Header);
headerFooter.Selection.Text = "Quarterly report";
if (headerFooter.Activate())
{
Console.WriteLine("Activate completed successfully.");
}Dim headers As HeaderFooterCollection = textControl.Sections(1).HeadersAndFooters
headers.Add(HeaderFooterType.Header)
Dim headerFooter As HeaderFooter = headers.GetItem(HeaderFooterType.Header)
headerFooter.Selection.Text = "Quarterly report"
If headerFooter.Activate() Then
Console.WriteLine("Activate completed successfully.")
End If