Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

AccordionControl.ForEachVisibleElement(Action<AccordionControlElement>) Method

Performs a certain action for each AccordionControl visible element.

Namespace: DevExpress.XtraBars.Navigation

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public void ForEachVisibleElement(
    Action<AccordionControlElement> handler
)

#Parameters

Name Type Description
handler Action<AccordionControlElement>

An action to perform against each visible element.

#Remarks

The ForEachVisibleElement method iterates through visible elements and invokes the specified action for them. The following elements are regarded as invisible:

The following code shows how you can perform an action on visible elements:

accordionControl1.ForEachVisibleElement((el) => {
    //Do some action
    //Toggle visibility for Items
    if (el.Style == DevExpress.XtraBars.Navigation.ElementStyle.Item) {
        el.Visible = !el.Visible;
    }
});
See Also