ImageProperties.Description Property
Specifies the description of an image.
Namespace: DevExpress.Blazor.RichEdit
Assembly: DevExpress.Blazor.RichEdit.v24.2.dll
NuGet Package: DevExpress.Blazor.RichEdit
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
String | The description. |
Remarks
Websites use image descriptions to form the alternative text (Alt text).
<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.Description == null)
properties.Description = "The first image";
});
@* ... *@
}
catch (OperationCanceledException e) {
Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
}
}
Use the Description property to get the description of the image.
See Also