Back to Devexpress

BarItem.ItemClick Event

windowsforms-devexpress-dot-xtrabars-dot-baritem-08bb8e63.md

latest7.3 KB
Original Source

BarItem.ItemClick Event

Occurs when the current item is clicked.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public event ItemClickEventHandler ItemClick
vb
Public Event ItemClick As ItemClickEventHandler

Event Data

The ItemClick event's data class is ItemClickEventArgs. The following properties provide information specific to this event:

PropertyDescription
ItemGets the BarItem whose link was clicked.
LinkGets the clicked BarItemLink.
MouseButtonGets the pressed mouse button.

Remarks

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

csharp
#region #ShowSearchFormMethod
buttonCustomAction.ItemClick += buttonCustomAction_ItemClick_ShowSearchFormMethod;
buttonCustomAction.Tag = richEditControl;

winforms-dashboard-custom-properties/CS/WinForms-Dashboard-Custom-Properties/Modules/ChartScaleBreakModule.cs#L28

csharp
group.ItemLinks.Add(barItem);
barItem.ItemClick += ChangeCustomPropertyValue;
designer.DashboardItemControlUpdated += Designer_DashboardItemControlUpdated;

winforms-dashboard-display-each-series-in-separate-pane-for-chart-items/CS/MultiPaneExtension/MultiPaneModule.cs#L196

csharp
barItem.RibbonStyle = RibbonItemStyles.All;
barItem.ItemClick += OnEnableClick;
return barItem;

xaf-win-custom-action-with-custom-action-control/CS/EFCore/CustomActionEF/CustomActionEF.Win/ActionControls/BarCheckItemCheckableSimpleActionControl.cs#L12

csharp
base.OnEndInit();
    BarItem.ItemClick += BarItem_ItemClick;
}

winforms-treelist-copy-nodes-to-another-treelist/CS/CopyNodesExample/MainForm.cs#L23

csharp
copyButtonItem.ItemClick += CopyButtonItem_ItemClick;
clearButtonItem.ItemClick += ClearButtonItem_ItemClick;

winforms-richeditcontrol-common-api/VB/RichEditAPISample/CodeExamples/RichEditControlActions.vb#L20

vb
' #Region "#ShowSearchFormMethod"
            AddHandler buttonCustomAction.ItemClick, AddressOf buttonCustomAction_ItemClick_ShowSearchFormMethod
            buttonCustomAction.Tag = richEditControl

winforms-dashboard-custom-properties/VB/WinForms-Dashboard-Custom-Properties/Modules/ChartScaleBreakModule.vb#L28

vb
group.ItemLinks.Add(barItem)
AddHandler barItem.ItemClick, AddressOf ChangeCustomPropertyValue
AddHandler designer.DashboardItemControlUpdated, AddressOf Designer_DashboardItemControlUpdated

winforms-dashboard-display-each-series-in-separate-pane-for-chart-items/VB/MultiPaneExtension/MultiPaneModule.vb#L168

vb
barItem.RibbonStyle = RibbonItemStyles.All
AddHandler barItem.ItemClick, AddressOf OnEnableClick
Return barItem

winforms-treelist-copy-nodes-to-another-treelist/VB/CopyNodesExample/MainForm.vb#L26

vb
AddHandler copyButtonItem.ItemClick, AddressOf CopyButtonItem_ItemClick
AddHandler clearButtonItem.ItemClick, AddressOf ClearButtonItem_ItemClick

winforms-spreadsheet-spell-check-cell-text/VB/SpreadsheetSpellchecking/Form1.vb#L58

vb
item.Tag = command
AddHandler item.ItemClick, AddressOf OnPopupMenu_ItemClick
itemLinks.Add(item)

See Also

ItemRightClick

BarItem.PerformClick*

ItemClick

BarManager.PerformClick*

ItemClickFireMode

CausesValidation

BarItem Class

BarItem Members

DevExpress.XtraBars Namespace