Back to Devexpress

AccordionControlElement.Elements Property

windowsforms-devexpress-dot-xtrabars-dot-navigation-dot-accordioncontrolelement.md

latest4.5 KB
Original Source

AccordionControlElement.Elements Property

Provides access to the collection of nested elements.

Namespace : DevExpress.XtraBars.Navigation

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Data")]
[XtraSerializableProperty(true, true, false, 999)]
public AccordionControlElementCollection Elements { get; }
vb
<DXCategory("Data")>
<XtraSerializableProperty(True, True, False, 999)>
Public ReadOnly Property Elements As AccordionControlElementCollection

Property Value

TypeDescription
DevExpress.XtraBars.Navigation.AccordionControlElementCollection

The collection of nested elements.

|

Remarks

Groups in the AccordionControl can display nested elements. To customize the nested element collection in code, use the Elements property. To add child elements to a group at design time, use the Add Item and Add Group commands available from the smart tag menu.

Items cannot display nested items and groups. Thus, the Elements property is not in effect for these elements.

Tip

A group is an AccordionControlElement whose AccordionControlElement.Style property is set to ElementStyle.Group.

An item is an AccordionControlElement whose AccordionControlElement.Style property is set to ElementStyle.Item.

See the AccordionControlElement topic for the difference between items and groups.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Elements property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-generate-skin-palettes-with-ai/CS/DevExpress.AI.WinForms.AIGeneratePalette.Demo/AccordionShellForm.cs#L36

csharp
navigationAccordion.SelectElement(navigationAccordion.Elements[0].Elements[0]);
}

See Also

Style

Elements

GetElements()

GetVisibleElements()

ForEachElement(Action<AccordionControlElement>)

ForEachVisibleElement(Action<AccordionControlElement>)

IsVisible

Level

AccordionControlElement Class

AccordionControlElement Members

DevExpress.XtraBars.Navigation Namespace