Back to Devexpress

LineSpacingType Enum

blazor-devexpress-dot-blazor-dot-richedit-b600a785.md

latest2.7 KB
Original Source

LineSpacingType Enum

Lists values that specify the line spacing type for a paragraph.

Namespace : DevExpress.Blazor.RichEdit

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

NuGet Package : DevExpress.Blazor.RichEdit

Declaration

csharp
public enum LineSpacingType

Members

NameDescription
Single

The single line spacing.

| | Sesquialteral |

The line spacing is one-and-one-half times that of single spacing.

| | Double |

The double line spacing.

| | Multiple |

Allows you to set line spacing that is several times that of single spacing. Use the LineSpacing property to specify the spacing value in numbers greater than 1 (for instance, the 1.75 number specifies line spacing that is 75 percent higher than the Single spacing).

| | Exactly |

Allows you to specify the exact line spacing. Use the LineSpacing property to specify the spacing value in twips.

| | AtLeast |

Allows you to specify the minimum line spacing that RichEdit can increase to fit the font or graphic on the line. Use the LineSpacing property to specify the minimum spacing value in twips.

|

The following properties accept/return LineSpacingType values:

Remarks

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.LineSpacingType != LineSpacingType.Exactly)
                        properties.LineSpacingType = LineSpacingType.Exactly;
                });
        }
        catch (OperationCanceledException e) {
            Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
        }
}

See Also

DevExpress.Blazor.RichEdit Namespace