Back to Devexpress

BarItemLink.ActAsButtonGroup Property

windowsforms-devexpress-dot-xtrabars-dot-baritemlink-0e642988.md

latest2.9 KB
Original Source

BarItemLink.ActAsButtonGroup Property

Gets or sets whether the bar item link is arranged in the same manner as a BarButtonGroup object. This property is only in effect within a RibbonControl.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Behavior")]
[SupportedByBarManager(SupportedByBarManagerKind.NonSupported)]
[XtraSerializableProperty]
public virtual bool ActAsButtonGroup { get; set; }
vb
<XtraSerializableProperty>
<SupportedByBarManager(SupportedByBarManagerKind.NonSupported)>
<DXCategory("Behavior")>
Public Overridable Property ActAsButtonGroup As Boolean

Property Value

TypeDescription
Boolean

true if the bar item link is arranged using the Button Group Layout; false , if the bar item link is arranged using the regular layout.

|

Remarks

Bar items can be arranged within a Ribbon page group using the regular layout or the Button Group layout. Use the ActAsButtonGroup property to specify how bar item links must be arranged.

  • Regular Layout (default)

  • Button Group Layout

The following image illustrates these two layouts. For all bar item links in these images, the ActAsButtonGroup property is set to a corresponding value.

Example

The following example shows how to apply the Button Group layout to a set of bar item links. The Button Group layout is enabled via the BarItemLink.ActAsButtonGroup property.

csharp
using DevExpress.XtraBars;

BarButtonItem[] items = new BarButtonItem[] {barButtonItem1, barButtonItem2, barButtonItem3 };

foreach (BarButtonItem item in items) {
    item.Links[0].ActAsButtonGroup = true;
}
vb
Imports DevExpress.XtraBars

Private items As BarButtonItem() = New BarButtonItem() {barButtonItem1, _ 
barButtonItem2, barButtonItem3 }

For Each item As BarButtonItem In items
    item.Links(0).ActAsButtonGroup = True
Next item

See Also

Button Groups

BarItemLink Class

BarItemLink Members

DevExpress.XtraBars Namespace