Skip to main content

AccordionControl.CustomElementText Event

Provides the capability to dynamically rename specific AccordionControl elements.

Namespace: DevExpress.XtraBars.Navigation

Assembly: DevExpress.XtraBars.v24.1.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