Back to Devexpress

BarListItem.ListItemClick Event

windowsforms-devexpress-dot-xtrabars-dot-barlistitem-c135ce79.md

latest3.4 KB
Original Source

BarListItem.ListItemClick Event

Enables you to provide responses to list item clicks.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public event ListItemClickEventHandler ListItemClick
vb
Public Event ListItemClick As ListItemClickEventHandler

Event Data

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

PropertyDescription
IndexGets the index of the clicked list item.
ItemGets the bar item whose list item was clicked.

Remarks

The ListItemClick event fires in response to a click on a list item. The event parameter’s ListItemClickEventArgs.Item property represents the bar item whose list item was clicked. The ListItemClickEventArgs.Index property allows you to identify the clicked list item (its position within the bar item’s BarListItem.Strings collection).

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ListItemClick 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-dashboard-display-each-series-in-separate-pane-for-chart-items/CS/MultiPaneExtension/MultiPaneModule.cs#L260

csharp
barItem.Strings.Add("Linear");
barItem.ListItemClick += BarItem_ListItemClick;
barItem.RibbonStyle = RibbonItemStyles.All;

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

vb
barItem.Strings.Add("Linear")
AddHandler barItem.ListItemClick, AddressOf BarItem_ListItemClick
barItem.RibbonStyle = RibbonItemStyles.All

See Also

ItemClick

BarListItem Class

BarListItem Members

DevExpress.XtraBars Namespace