Back to Devexpress

HeaderFooterType Enum

blazor-devexpress-dot-blazor-dot-richedit-9cfed50a.md

latest2.2 KB
Original Source

HeaderFooterType Enum

Lists header and footer types.

Namespace : DevExpress.Blazor.RichEdit

Assembly : DevExpress.Blazor.RichEdit.v25.2.dll

NuGet Package : DevExpress.Blazor.RichEdit

Declaration

csharp
public enum HeaderFooterType

Members

NameDescription
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:

razor
<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

DevExpress.Blazor.RichEdit Namespace