Skip to main content

Image.Outline Property

Gets the outline settings of the image.

Namespace: DevExpress.Blazor.RichEdit

Assembly: DevExpress.Blazor.RichEdit.v24.1.dll

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

public IOutline Outline { get; }

Property Value

Type Description
IOutline

An object that implements the IOutline interface and contains outline settings.

Remarks

Use the ChangePropertiesAsync method to change the color and/or width of the image’s outline.

<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.Outline.Width == 0) {
                    properties.Outline.Color = System.Drawing.Color.Black;
                    properties.Outline.Width = UnitConverter.CentimetersToTwips(0.2f);
                }
            });
            @* ... *@
        }
        catch (OperationCanceledException e) {
            Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
        }
}
See Also