windowsforms-devexpress-dot-xtrabars-dot-baritem-08bb8e63.md
Occurs when the current item is clicked.
Namespace : DevExpress.XtraBars
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public event ItemClickEventHandler ItemClick
Public Event ItemClick As ItemClickEventHandler
The ItemClick event's data class is ItemClickEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Item | Gets the BarItem whose link was clicked. |
| Link | Gets the clicked BarItemLink. |
| MouseButton | Gets the pressed mouse button. |
The BarItem.ItemClickFireMode option specifies when the Click event fires, immediately or postponed, after processing the current event queue.
Read the following topic for detailed information and examples: Provide Functionality to Bar Items.
The following code snippets (auto-collected from DevExpress Examples) contain references to the ItemClick event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-richeditcontrol-common-api/CS/RichEditAPISample/CodeExamples/RichEditControlActions.cs#L18
#region #ShowSearchFormMethod
buttonCustomAction.ItemClick += buttonCustomAction_ItemClick_ShowSearchFormMethod;
buttonCustomAction.Tag = richEditControl;
group.ItemLinks.Add(barItem);
barItem.ItemClick += ChangeCustomPropertyValue;
designer.DashboardItemControlUpdated += Designer_DashboardItemControlUpdated;
barItem.RibbonStyle = RibbonItemStyles.All;
barItem.ItemClick += OnEnableClick;
return barItem;
base.OnEndInit();
BarItem.ItemClick += BarItem_ItemClick;
}
winforms-treelist-copy-nodes-to-another-treelist/CS/CopyNodesExample/MainForm.cs#L23
copyButtonItem.ItemClick += CopyButtonItem_ItemClick;
clearButtonItem.ItemClick += ClearButtonItem_ItemClick;
winforms-richeditcontrol-common-api/VB/RichEditAPISample/CodeExamples/RichEditControlActions.vb#L20
' #Region "#ShowSearchFormMethod"
AddHandler buttonCustomAction.ItemClick, AddressOf buttonCustomAction_ItemClick_ShowSearchFormMethod
buttonCustomAction.Tag = richEditControl
group.ItemLinks.Add(barItem)
AddHandler barItem.ItemClick, AddressOf ChangeCustomPropertyValue
AddHandler designer.DashboardItemControlUpdated, AddressOf Designer_DashboardItemControlUpdated
barItem.RibbonStyle = RibbonItemStyles.All
AddHandler barItem.ItemClick, AddressOf OnEnableClick
Return barItem
winforms-treelist-copy-nodes-to-another-treelist/VB/CopyNodesExample/MainForm.vb#L26
AddHandler copyButtonItem.ItemClick, AddressOf CopyButtonItem_ItemClick
AddHandler clearButtonItem.ItemClick, AddressOf ClearButtonItem_ItemClick
winforms-spreadsheet-spell-check-cell-text/VB/SpreadsheetSpellchecking/Form1.vb#L58
item.Tag = command
AddHandler item.ItemClick, AddressOf OnPopupMenu_ItemClick
itemLinks.Add(item)
See Also