SectionNumber Property
- Not found
- No package of this release declares this member on this type or on a class it derives from.
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
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.
Syntax
No package of this release declares this member. The declaration below is the reference's, and code that uses it does not compile.
public int SectionNumber { get; }Public ReadOnly Property SectionNumber() As IntegerExamples
The following example creates a header for the first section and configures its content or layout by using HeaderFooter.sectionnumber.
HeaderFooterCollection headers = textControl.Sections[1].HeadersAndFooters;
headers.Add(HeaderFooterType.Header);
HeaderFooter headerFooter = headers.GetItem(HeaderFooterType.Header);
headerFooter.Selection.Text = "Quarterly report";
int sectionNumber = headerFooter.Section;
if (sectionNumber > 0)
{
Section section = textControl.Sections[sectionNumber];
Console.WriteLine($"Page width: {section.Format.PageSize.Width}");
}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"
Dim sectionNumber As Integer = headerFooter.Section
If sectionNumber > 0 Then
Dim section As Section = textControl.Sections.Item(sectionNumber)
Console.WriteLine($"Page width: {section.Format.PageSize.Width}")
End IfLimitations
Read only.