HeaderFooterType Enum
Lists header and footer types.
Namespace: DevExpress.Blazor.RichEdit
Assembly: DevExpress.Blazor.RichEdit.v24.2.dll
NuGet Package: DevExpress.Blazor.RichEdit
Declaration
public enum HeaderFooterType
Members
Name | Description |
---|---|
First
|
A header/footer is displayed on the first page of the section. |
Odd
|
A header/footer is displayed on odd pages of the section. |
Even
|
A header/footer is displayed on even pages of the section. |
Primary
|
A header/footer is displayed on all pages of the section if the document does not distinguish between first, odd, and even pages. Actually, this is an alias for the Odd type. |
Remarks
Values listed by this enumeration are used in the following methods:
- GetHeaderAsync(HeaderFooterType, Boolean, CancellationToken)
- GetFooterAsync(HeaderFooterType, Boolean, CancellationToken)
<DxRichEdit @ref="richEdit" />
@code {
DxRichEdit richEdit;
Document documentAPI;
@* ... *@
/* Surround the code that contains an asynchronous operation with a try-catch block to handle
the OperationCanceledException. This exception is thrown when an asynchronous operation is canceled. */
try {
documentAPI = richEdit.DocumentAPI;
@* ... *@
Section section = await documentAPI.Sections.GetAsync(0);
var footer = await section.GetFooterAsync(HeaderFooterType.Primary, true);
await footer.AddTextAsync(DateTime.Now.Year.ToString());
@* ... *@
}
catch (OperationCanceledException e) {
Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
}
}
See Also