Skip to main content

RepositoryItemTokenEdit.CustomDrawTokenGlyph Event

Allows you to re-draw the default token glyph.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

[DXCategory("Events")]
public event TokenEditCustomDrawTokenGlyphEventHandler CustomDrawTokenGlyph

Event Data

The CustomDrawTokenGlyph event's data class is DevExpress.XtraEditors.TokenEditCustomDrawTokenGlyphEventArgs.

Remarks

By default, each TokenEdit token displays the ‘remove’ icon (see the figure below). If the RepositoryItemTokenEdit.DeleteTokenOnGlyphClick property equals true, clicking this glyph at runtime will remove the related token.

TokenEdit - Default Token Glyph

The CustomDrawTokenGlyph event allows you to replace the default token glyph with your own custom icon. Coupled with the RepositoryItemTokenEdit.CustomDrawTokenText event, this allows you to completely repaint an entire token. The following figure illustrates a TokenEdit control with a custom drawn token applied.

TokenEdit - Custom Draw

See the Token Edit Control topic for a detailed example.

See Also