windowsforms-devexpress-dot-utils-dot-contextitem-710c83d5.md
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.v25.2.dll
NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core
[DXCategory("Layout")]
public ContextItemAlignmentOptions AlignmentOptions { get; }
<DXCategory("Layout")>
Public ReadOnly Property AlignmentOptions As ContextItemAlignmentOptions
| 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.
|
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 ;
the Position property — specifies the item position relative to the panel: Near , Center or Far.
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 for more information.
See Also