Back to Devexpress

BarItem.Alignment Property

windowsforms-devexpress-dot-xtrabars-dot-baritem-00d0fbf2.md

latest2.6 KB
Original Source

BarItem.Alignment Property

Gets or sets the horizontal alignment of the bar item’s link(s).

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(BarItemLinkAlignment.Default)]
[DXCategory("Appearance")]
public virtual BarItemLinkAlignment Alignment { get; set; }
vb
<DefaultValue(BarItemLinkAlignment.Default)>
<DXCategory("Appearance")>
Public Overridable Property Alignment As BarItemLinkAlignment

Property Value

TypeDefaultDescription
DevExpress.XtraBars.BarItemLinkAlignmentDefault

The horizontal alignment of the bar item’s link(s).

|

Remarks

Ribbon Control

In the Ribbon Control, the Alignment property specifies the alignment of the bar item’s links displayed in the tab header area and Ribbon Form’s caption, and buttons displayed in messages:

csharp
barButtonItemNetwork.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right;
vb
barButtonItemNetwork.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right

Bars / Toolbars

The Alignment property is in effect only for item links displayed within Bars with the UseWholeRow option enabled. The image below shows item links that are aligned to the bar’s left and right edges:

See Also

BarItem Class

BarItem Members

DevExpress.XtraBars Namespace