Skip to main content

SectionBreakType Enum

Lists the types of a section break.

Namespace: DevExpress.Blazor.RichEdit

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

NuGet Package: DevExpress.Blazor.RichEdit


public enum SectionBreakType


Name Description

A new section starts on the next page.


A new section begins on the next odd-numbered page.


A new section begins on the next even-numbered page.


A new section starts on the following paragraph of the same page. Currently not supported.


Use the SectionBreakType enumeration values to specify the type of section break before a new section. Use a CreateAsync method to add a new section to a document.

<DxRichEdit @bind-Selection="@selection" @ref="@richEdit" />
@code {
    DxRichEdit richEdit { get; set; }
    Selection selection { get; set; }

    protected override Task OnAfterRenderAsync(bool firstRender) {
        if (firstRender)
        return base.OnAfterRenderAsync(firstRender);

    async void InitializeDocument() {
    /* 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 {
            Document documentAPI = richEdit.DocumentAPI;
            await documentAPI.Sections.CreateAsync(richEdit.Selection.CaretPosition, SectionBreakType.EvenPage);      
        catch (OperationCanceledException e) {
            Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
See Also