Skip to main content
A newer version of this page is available. .

ContextItem.AlignmentOptions Property

Provides access to options that specify the panel in which the item is displayed, and its position in the panel.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v19.2.dll

Declaration

[DXCategory("Layout")]
public ContextItemAlignmentOptions AlignmentOptions { get; }

Property Value

Type Description
DevExpress.Utils.ContextItemAlignmentOptions

A DevExpress.Utils.ContextItemAlignmentOptions object that specifies the panel in which the item is displayed, and its position in the panel.

Remarks

The AlignmentOptions property provides access to the following options that specify the current item’s alignment relative to the owner control:

  • the Panel property — specifies the panel into which the item is placed: Top, Bottom, Center, Left, or Right;

    Note

    The alignment affects the item’s orientation — in the side panels, items are vertically oriented.

  • the Position property — specifies the item position relative to the panel: Near, Center or Far.

    Note

    The top and bottom panels, when displayed, overlap the near and far panels, and thus shift items in the latter nearer to center. Also note that if the owner control is right-to-left aligned (see Right-to-Left Layout), Near aligned items are right aligned.

To specify the panel’s back color and padding, use the corresponding settings accessible through the owner control’s ContextButtonOptions property.

If aligning relative to the owner control does not meet your needs, you can align the current item relative to another item— anchor element. See the ContextItem.AnchorAlignment property to learn more.

See Also