Back to Devexpress

RepositoryItemTokenEdit.CustomDrawTokenGlyph Event

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemtokenedit-7f707ac6.md

latest2.6 KB
Original Source

RepositoryItemTokenEdit.CustomDrawTokenGlyph Event

Allows you to re-draw the default token glyph.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Events")]
public event TokenEditCustomDrawTokenGlyphEventHandler CustomDrawTokenGlyph
vb
<DXCategory("Events")>
Public Event CustomDrawTokenGlyph As TokenEditCustomDrawTokenGlyphEventHandler

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.

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.

See the Token Edit Control topic for a detailed example.

See Also

CustomDrawTokenText

Token Edit Control

RepositoryItemTokenEdit Class

RepositoryItemTokenEdit Members

DevExpress.XtraEditors.Repository Namespace