Document.Sections Property
Provides access to document sections.
Namespace: DevExpress.Blazor.RichEdit
Assembly: DevExpress.Blazor.RichEdit.v24.1.dll
NuGet Package: DevExpress.Blazor.RichEdit
Declaration
public Sections Sections { get; }
Property Value
Type | Description |
---|---|
Sections | An object that allows you to manage document sections. |
Remarks
<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;
var sections = await documentAPI.Sections.GetAllAsync();
foreach (Section s in sections)
await s.ChangePropertiesAsync(properties => {
if (s.ColumnCount != 3)
properties.ColumnCount = 3;
});
}
catch (OperationCanceledException e) {
Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
}
}
See Also