blazor-devexpress-dot-blazor-dot-richedit-dot-listlevel-a76cd56e.md
Gets the number or bullet format of the list level’s paragraphs.
Namespace : DevExpress.Blazor.RichEdit
Assembly : DevExpress.Blazor.RichEdit.v25.2.dll
NuGet Package : DevExpress.Blazor.RichEdit
public ListLevelFormat ListLevelFormat { get; }
| Type | Description |
|---|---|
| ListLevelFormat |
The list level format.
|
Available values:
Show 14 items
| Name | Description | Example |
|---|---|---|
| Decimal |
The sequence consists of decimal numbers.
|
1, 2, 3
| | Bullet |
The sequence consists of bullet characters.
|
●, ●, ●
| | CardinalText |
The sequence consists of numbers written alphabetically.
|
One, Two, Three
| | DecimalEnclosedParentheses |
The sequence consists of decimal numbers enclosed in parentheses.
|
(1), (2), (3)
| | DecimalZero |
The sequence consists of decimal numbers with a zero added to numbers less than ten.
|
01, 02, … , 09, 10
| | Hex |
The sequence consists of hexadecimal numbers.
|
1, 2, … , e, f
| | LowerLetter |
The sequence consists of lowercase letters of the alphabet.
|
a, b, c
| | LowerRoman |
The sequence consists of lowercase Roman numerals.
|
i, ii, iii
| | None |
The default format. The sequence consists of decimal numbers.
|
1, 2, 3
| | NumberInDash |
The sequence consists of decimal numbers enclosed in dashes.
|
| | Ordinal |
The sequence consists of ordinal numbers written as numerals with letter suffixes.
|
1st, 2nd, 3rd
| | OrdinalText |
The sequence consists of ordinal numbers written alphabetically.
|
First, Second, Third
| | UpperLetter |
The sequence consists of uppercase letters of the alphabet.
|
A, B, C
| | UpperRoman |
The sequence consists of uppercase Roman numerals.
|
I, II, III
|
The Rich Edit supports only the formats that are listed in the ListLevelFormat enum. If you open a document that uses an unsupported list level format, the Rich Edit keeps that format, but displays it as Decimal.
Use the list’s ChangeLevelPropertiesAsync(Int32, Action<ListLevelProperties>, CancellationToken) method to change a list level’s number or bullet format.
<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.ListLevelFormat != ListLevelFormat.Decimal)
properties.ListLevelFormat = ListLevelFormat.Decimal;
});
}
catch (OperationCanceledException e) {
Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
}
}
See Also