blazor-devexpress-dot-blazor-dot-richedit-dot-paragraphproperties.md
Specifies whether and how the first line in the paragraph is indented.
Namespace : DevExpress.Blazor.RichEdit
Assembly : DevExpress.Blazor.RichEdit.v25.2.dll
NuGet Package : DevExpress.Blazor.RichEdit
public FirstLineIndentType? FirstLineIndentType { get; set; }
| 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.
|
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.
<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