ParagraphProperties.LineSpacingType Property
Specifies the type of spacing between lines in the paragraph.
Namespace: DevExpress.Blazor.RichEdit
Assembly: DevExpress.Blazor.RichEdit.v24.2.dll
NuGet Package: DevExpress.Blazor.RichEdit
#Declaration
public LineSpacingType? LineSpacingType { get; set; }
#Property Value
Type | Description |
---|---|
Nullable<Line |
The line spacing type. |
Available values:
Name | Description |
---|---|
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 Line |
Exactly | Allows you to specify the exact line spacing. Use the Line |
At |
Allows you to specify the minimum line spacing that Rich |
#Remarks
The LineSpacing property specifies the line spacing value when the lineSpacingType
property is set to Exactly
, AtLeast
, or Multiple
. When the lineSpacingType
property is set to Single
, Sesquialteral
, or Double
, the LineSpacing property is not in effect and the line spacing value is based on the height of the text.
Use the LineSpacingType property to get a paragraph’s line spacing type.
<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}");
}
}