windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemtokenedit-775d3f58.md
Fires before this TokenEdit control’s popup menu is shown. Allows you to customize items within this menu.
Namespace : DevExpress.XtraEditors.Repository
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Events")]
public event BeforeShowMenuEventHandler BeforeShowMenu
<DXCategory("Events")>
Public Event BeforeShowMenu As BeforeShowMenuEventHandler
The BeforeShowMenu event's data class is DevExpress.XtraEditors.Controls.BeforeShowMenuEventArgs.
The BeforeShowMenu property allows you to customize the popup menu, shown when end-users right-click this Token Edit Control. Event arguments provide the following properties:
The code snippet below illustrates an example.
void Properties_BeforeShowMenu(object sender, DevExpress.XtraEditors.Controls.BeforeShowMenuEventArgs e) {
e.Menu.Items.Insert(1, new DXMenuItem() { Caption = "Custom Menu Item" });
e.Location = new Point(100, 100);
e.RestoreMenu = true;
}
Private Sub Properties_BeforeShowMenu(ByVal sender As Object, ByVal e As DevExpress.XtraEditors.Controls.BeforeShowMenuEventArgs)
e.Menu.Items.Insert(1, New DXMenuItem() { Caption = "Custom Menu Item" })
e.Location = New Point(100, 100)
e.RestoreMenu = True
End Sub
See Also