Skip to main content

ListLevelProperties.FirstLineIndentType Property

Specifies whether and how the first lines of the list level’s paragraphs are indented.

Namespace: DevExpress.Blazor.RichEdit

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

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

public FirstLineIndentType FirstLineIndentType { get; set; }

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, use the FirstLineIndent property to specify the indent value.

Use the FirstLineIndentType property to get 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