Image.WrapType Property
Gets the wrap type of the image.
Namespace: DevExpress.Blazor.RichEdit
Assembly: DevExpress.Blazor.RichEdit.v24.2.dll
NuGet Package: DevExpress.Blazor.RichEdit
Declaration
public WrapType WrapType { get; }
Property Value
Type | Description |
---|---|
WrapType | A wrap type. |
Available values:
Name | Description |
---|---|
Inline | A shape is displayed in the text and is treated like a character. |
TopAndBottom | The text is displayed above and below a shape. |
Tight | Currently not supported and is displayed as the Square wrap type. |
Through | Currently not supported and is displayed as the Square wrap type. |
Square | The text is wrapped around the rectangular borders of a shape. |
BehindText | A shape is displayed behind the text. |
InFrontOfText | A shape is displayed in front of the text. |
Remarks
Use the ChangePropertiesAsync method to change the image’s wrap 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;
@* ... *@
Image firstImage = await documentAPI.Images.GetAsync(0);
@* ... *@
await firstImage.ChangePropertiesAsync(properties => {
if (firstImage.WrapType != WrapType.TopAndBottom)
properties.WrapType = WrapType.TopAndBottom;
});
@* ... *@
}
catch (OperationCanceledException e) {
Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
}
}