Skip to main content

FloatingObjectHorizontalAnchorElement Enum

Lists values that specify the element to which the floating object is horizontally aligned.

Namespace: DevExpress.Blazor.RichEdit

Assembly: DevExpress.Blazor.RichEdit.v23.2.dll

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

public enum FloatingObjectHorizontalAnchorElement

Members

Name Description
Page

A floating object is aligned to a page.

Character

A floating object is aligned to a character.

Column

A floating object is aligned to a column.

Margin

A floating object is aligned to the left or right page margin, or centered horizontally.

LeftMargin

A floating object is aligned to the left margin.

RightMargin

A floating object is aligned to the right margin.

InsideMargin

Currently not supported and is treated as the LeftMargin anchor element.
Floating objects are aligned to the left margin for odd pages, and the right margin for even pages.

OutsideMargin

Currently not supported and is treated as the RightMargin anchor element.
Floating objects are aligned to the right margin for odd pages, and the left margin for even pages.

Related API Members

The following properties accept/return FloatingObjectHorizontalAnchorElement values:

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;
            @* ... *@
            Image firstImage = await documentAPI.Images.GetAsync(0);
            @* ... *@
            await firstImage.ChangePropertiesAsync(properties => {
                if (firstImage.HorizontalAnchorElement != FloatingObjectHorizontalAnchorElement.Page)
                    properties.HorizontalAnchorElement = FloatingObjectHorizontalAnchorElement.Page;
            });
            @* ... *@
        }
        catch (OperationCanceledException e) {
            Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
        }
}
See Also