Back to Devexpress

RepositoryItemTokenEdit.TokenDoubleClick Event

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemtokenedit-a54e97ef.md

latest2.9 KB
Original Source

RepositoryItemTokenEdit.TokenDoubleClick Event

Occurs when an end-user double clicks a token within this TokenEdit.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

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

Event Data

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

Remarks

Handle the TokenDoubleClick event to perform specific actions when a token is double clicked. For instance, the code below illustrates how to display a panel assigned to the RepositoryItemTokenEdit.PopupPanel property, indicating that its default display on mouse hover is disabled.

csharp
tokenEdit1.Properties.PopupPanelOptions.ShowPopupPanel = false;
tokenEdit1.Properties.TokenDoubleClick += Properties_TokenDoubleClick;

void Properties_TokenDoubleClick(object sender, DevExpress.XtraEditors.TokenEditTokenClickEventArgs e) {
    Point showPoint = ((Control)sender).PointToScreen(new Point(e.Bounds.X + e.Bounds.Width / 2, e.Bounds.Y));
    tokenEdit1.Properties.PopupPanel.ShowBeakForm(showPoint, true, tokenEdit1);
}
vb
tokenEdit1.Properties.PopupPanelOptions.ShowPopupPanel = false
tokenEdit1.Properties.TokenDoubleClick += Properties_TokenDoubleClick

Private Sub Properties_TokenDoubleClick(sender As Object, e As DevExpress.XtraEditors.TokenEditTokenClickEventArgs)
    Dim showPoint As Point = DirectCast(sender, Control).PointToScreen(New Point(e.Bounds.X + e.Bounds.Width / 2, e.Bounds.Y))
    tokenEdit1.Properties.PopupPanel.ShowBeakForm(showPoint, True, tokenEdit1)
End Sub

For single mouse clicks, handle the RepositoryItemTokenEdit.TokenClick event instead.

See Also

TokenClick

RepositoryItemTokenEdit Class

RepositoryItemTokenEdit Members

DevExpress.XtraEditors.Repository Namespace