.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.v20.2.Core.dll


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

Property Value

Type Description

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


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.


Document document = server.Document;
Section firstSection = document.Sections[0];
// Modify the header of the HeaderFooterType.First type.
SubDocument myHeader = firstSection.BeginUpdateHeader(HeaderFooterType.First);
DocumentRange range = myHeader.InsertText(myHeader.CreatePosition(0), " PAGE NUMBER ");
Field fld = myHeader.Fields.Create(range.End, "PAGE \\* ARABICDASH");
// Display the header of the HeaderFooterType.First type on the first page.
firstSection.DifferentFirstPage = true;
See Also