Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RepositoryItemTokenEdit.TokenClick Event

Fires when a user clicks a token.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#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