Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ParagraphProperties.FirstLineIndentType Property

Specifies whether and how the first line in the paragraph is indented.

Namespace: DevExpress.Blazor.RichEdit

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

NuGet Package: DevExpress.Blazor.RichEdit

#Declaration

#Property Value

Type Description
Nullable<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

The FirstLineIndent property specifies the indent of the paragraph’s first line when the FirstLineIndentType property is set to a value other than None.

Use the FirstLineIndentType property to get whether and how the first line in a paragraph is indented.

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;
            IReadOnlyList<Paragraph> paragraphs = await documentAPI.Paragraphs.GetAllAsync();
            foreach (Paragraph p in paragraphs)
                await p.ChangePropertiesAsync(properties => {
                    if (p.FirstLineIndentType != FirstLineIndentType.Indented)
                        properties.FirstLineIndentType = FirstLineIndentType.Indented;
                });
        }
        catch (OperationCanceledException e) {
            Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
        }
}
See Also