Back to Devexpress

ContextItem.Alignment Property

windowsforms-devexpress-dot-utils-dot-contextitem-96f8dc4f.md

latest2.6 KB
Original Source

ContextItem.Alignment Property

Gets or sets the current item’s alignment relative to the owner control. This property is obsolete, use ContextItem.AlignmentOptions instead.

Namespace : DevExpress.Utils

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
[Browsable(false)]
[DefaultValue(ContextItemAlignment.TopNear)]
[DXCategory("Layout")]
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual ContextItemAlignment Alignment { get; set; }
vb
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Never)>
<DXCategory("Layout")>
<DefaultValue(ContextItemAlignment.TopNear)>
Public Overridable Property Alignment As ContextItemAlignment

Property Value

TypeDefaultDescription
DevExpress.Utils.ContextItemAlignmentTopNear

A ContextItemAlignment enumeration value that specifies the current item’s alignment relative to the owner control.

|

Remarks

The Alignment property specifies the alignment of the current item relative to the owner control. Depending on the item’s alignment, it is:

  • placed in the corresponding panel: top, bottom, near, far, or center (the first statement of the ContextItemAlignment enumeration value specifies the panel into which the item is placed);

  • aligned relative to the panel: near, far, or middle for horizontally oriented panels; top, bottom, or center for vertically oriented (the second statement of the value).

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

AnchorAlignment

ContextItem Class

ContextItem Members

DevExpress.Utils Namespace