Skip to main content

RepositoryItemTokenEdit.TokenClick Event

Fires when a user clicks a token.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.1.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