Skip to main content
A newer version of this page is available. .

AccordionControl.CustomContextButtonToolTip Event

Allows you to dynamically customize item tooltips.

Namespace: DevExpress.XtraBars.Navigation

Assembly: DevExpress.XtraBars.v19.2.dll

Declaration

[DXCategory("Events")]
public event AccordionControlContextButtonToolTipEventHandler CustomContextButtonToolTip

Event Data

The CustomContextButtonToolTip event's data class is DevExpress.XtraBars.Navigation.AccordionControlContextButtonToolTipEventArgs.

Remarks

The CustomContextButtonToolTip event is designed to modify a context button’s tool-tip according to the value in the hovered point. Primarily, this applies to rating and zoom track bar items. The following code sample illustrates how to assign a different tool-tip for each of the 5 rating button grades.

void accordionControl1_CustomContextButtonToolTip(object sender, AccordionControlContextButtonToolTipEventArgs e) {
    if(e.ContextItem.GetType().ToString() == "AccordeonRatingContextItem") {
        int rating = (int)e.Value;
        switch(rating) {
            case 1: e.Text = "Very Bad"; break;
            case 2: e.Text = "Bad"; break;
            case 3: e.Text = "Average"; break;
            case 4: e.Text = "Good"; break;
            case 5: e.Text = "Excellent"; break;
            default: e.Text = String.Empty; break;
        }
    }
}
See Also