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.CustomElementText Event

Provides the capability to dynamically rename specific AccordionControl elements.

Namespace: DevExpress.XtraBars.Navigation

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DXCategory("Events")]
public event CustomElementTextEventHandler CustomElementText

#Event Data

The CustomElementText event's data class is DevExpress.XtraBars.Navigation.CustomElementTextEventArgs.

#Remarks

The following code sample illustrates how to modify the text of an empty group caption.

void accordionControl1_CustomElementText(object sender, CustomElementTextEventArgs e) {
    if(e.ObjectInfo.Element.Style == ElementStyle.Group && e.ObjectInfo.Element.Elements.Count == 0) e.Text = e.Text + " (Empty)";
}
See Also