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

RepositoryItemTokenEdit.TokenClick Event

Fires when a user clicks a token.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v19.2.dll

Declaration

[DXCategory("Events")]
public event TokenEditTokenClickEventHandler TokenClick

Event Data

The TokenClick event's data class is DevExpress.XtraEditors.TokenEditTokenClickEventArgs.

Remarks

The TokenClick event occurs when a user clicks a token caption or token glyph. Read the e.Value and e.Description event arguments to determine the clicked token.

private void tokenEdit1_Properties_TokenClick(object sender, DevExpress.XtraEditors.TokenEditTokenClickEventArgs e) {
    if(e.Description.Contains("@"))
        System.Diagnostics.Process.Start("mailto:" + e.Description);
}

Note

The TokenClick event fires regardless of whether the caption or glyph is clicked. If the RepositoryItemTokenEdit.DeleteTokenOnGlyphClick property equals true, clicking the token glyph will automatically remove the token, whatever code the TokenClick event handler executes.

See Also