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

TileView.CustomContextButtonToolTip Event

Allows you to dynamically customize tooltips of context buttons, displayed by this TileView.

Namespace: DevExpress.XtraGrid.Views.Tile

Assembly: DevExpress.XtraGrid.v19.1.dll

Declaration

[DXCategory("Context Buttons")]
public event TileViewContextButtonToolTipEventHandler CustomContextButtonToolTip

Event Data

The CustomContextButtonToolTip event's data class is TileViewContextButtonToolTipEventArgs. The following properties provide information specific to this event:

Property Description
Item Gets the currently processed context button.
RowHandle Gets the row handle of the currently processed tile.
Text Gets or sets the tooltip text.
Value Gets the raiting context button’s value for which a tooltip needs to be provided.

Remarks

A TileView can display context buttons for each tile (see the TileView.ContextButtons property description to learn more). The CustomContextButtonToolTip event allows you to customize a tooltip for each context button. Primarily, this applies to RatingContextButtons and TrackBarContextButtons. The following code sample illustrates how to assign a different tool-tip for each of the 5 rating button grades.


void tileControl1_CustomContextButtonToolTip(object sender, TileContextButtonToolTipEventArgs e) {
    if(e.ContextItem.GetType().ToString() == "RatingContextItem") {
        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