Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

FloatingObjectVerticalAlignment Enum

Lists values that specify the vertical alignment for a floating object.

Namespace: DevExpress.Blazor.RichEdit

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

NuGet Package: DevExpress.Blazor.RichEdit

#Declaration

C#
public enum FloatingObjectVerticalAlignment

#Members

Name Description
None

A floating object is not aligned.

Top

A floating object is aligned to the top of a vertical anchor element.

Center

A floating object is aligned to the center of a vertical anchor element.

Bottom

A floating object is aligned to the bottom of a vertical anchor element.

Inside

Currently not supported and is displayed as the Top alignment type. Floating objects are aligned to the top of a vertical anchor element for odd pages, and the bottom of a vertical anchor element for even pages.

Outside

Currently not supported and is displayed as the Bottom alignment type. Floating objects are aligned to the bottom of a vertical anchor element for odd pages, and the top of a vertical anchor element for even pages.

#Related API Members

The following properties accept/return FloatingObjectVerticalAlignment values:

#Remarks

Razor
<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.VerticalAlignment != FloatingObjectVerticalAlignment.Center)
                    properties.VerticalAlignment = FloatingObjectVerticalAlignment.Center;
            });
            @* ... *@
        }
        catch (OperationCanceledException e) {
            Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
        }
}
See Also