Fields Class
Contains members that allow you to manage a sub-document’s fields.
Namespace: DevExpress.Blazor.RichEdit
Assembly: DevExpress.Blazor.RichEdit.v24.2.dll
NuGet Package: DevExpress.Blazor.RichEdit
#Declaration
public class Fields :
ElementCollection<Field>
#Related API Members
The following members return Fields objects:
#Remarks
Use the Fields property to access an object of the Fields
type. This object contains methods to create, get, and update fields and change their display modes.
The following example shows how you can create a DATE field at the beginning of the main sub-document:
<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;
@* ... *@
Field dateField = await documentAPI.Fields.CreateAsync(0, "DATE");
await documentAPI.Fields.UpdateAsync(dateField);
@* ... *@
}
catch (OperationCanceledException e) {
Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
}
}