The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Section.DifferentFirstPage Property

Gets or sets whether the header and footer areas of the first page can be different from other pages in the section.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v19.1.Core.dll

Declaration

bool DifferentFirstPage { get; set; }
Property DifferentFirstPage As Boolean
bool DifferentFirstPage { get; set; }
Property DifferentFirstPage As Boolean

Property Value

Type Description
Boolean

true to enable different settings for the first page; otherwise, false.

Property Value

Type Description
Boolean

true to enable different settings for the first page; otherwise, false.

Remarks

Set the DifferentFirstPage property to true to display the header/footer of the HeaderFooterType.First type on the first page of the section. Otherwise, the first page will display the same header/footer as other pages, or the HeaderFooterType.Odd type header/footer if the Document.DifferentOddAndEvenPages property is true.

You can also use the ToggleDifferentFirstPageCommand command to enable/disable different first page.

Examples

The following code snippet opens the first section's header for editing. The header type is HeaderFooterType.First, so it is displayed for the first page only if the corresponding mode is enabled (use the Section.DifferentFirstPage property). Then, the text string and a PAGE field are inserted and the Section.EndUpdateHeader method is called to finalize the modification.

document.AppendSection()
Dim firstSection As Section = document.Sections(0)
' Modify the header of the HeaderFooterType.First type.
Dim myHeader As SubDocument = firstSection.BeginUpdateHeader(HeaderFooterType.First)
Dim range As DocumentRange = myHeader.InsertText(myHeader.CreatePosition(0), " PAGE NUMBER ")
Dim fld As Field = myHeader.Fields.Create(range.End, "PAGE \* ARABICDASH")
myHeader.Fields.Update()
firstSection.EndUpdateHeader(myHeader)
' Display the header of the HeaderFooterType.First type on the first page.
firstSection.DifferentFirstPage = True
See Also