Skip to main content

ListLevel.FirstLineIndentType Property

Gets whether and how the first line of a list level’s paragraph is indented.

Namespace: DevExpress.Blazor.RichEdit

Assembly: DevExpress.Blazor.RichEdit.v24.1.dll

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

public FirstLineIndentType FirstLineIndentType { get; }

Property Value

Type Description
FirstLineIndentType

The first line’s indent type.

Available values:

Name Description
None

The first line of a paragraph does not have any indent.

Indented

The first line of a paragraph is indented to the right.

Hanging

The first line of a paragraph is indented to the left.

Remarks

When the FirstLineIndentType property is set to Indented or Hanging, the FirstLineIndent property determines the indent value.

Use the list’s ChangeLevelPropertiesAsync(Int32, Action<ListLevelProperties>, CancellationToken) method to change whether and how the first lines of a list level’s paragraphs are indented.

<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;
            List multiLevelList = await documentAPI.Lists.CreateAsync(ListType.MultiLevel);
            IReadOnlyList<ListLevel> listLevels = multiLevelList.ListLevels;
            ListLevel firstLevel = listLevels[0];
            await multiLevelList.ChangeLevelPropertiesAsync(0, properties => {
                if (firstLevel.FirstLineIndentType != FirstLineIndentType.Indented)
                    properties.FirstLineIndentType = FirstLineIndentType.Indented;
            });
        }
        catch (OperationCanceledException e) {
            Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
        }
}

The FirstLineIndentType property is not in effect for the list level’s paragraph when the paragraph’s FirstLineIndentType property is set to a value other than None.

See Also