Back to Devexpress

ListItemClickEventArgs.Index Property

windowsforms-devexpress-dot-xtrabars-dot-listitemclickeventargs-933fca29.md

latest3.0 KB
Original Source

ListItemClickEventArgs.Index Property

Gets the index of the clicked list item.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public int Index { get; }
vb
Public ReadOnly Property Index As Integer

Property Value

TypeDescription
Int32

A zero-based integer value representing the index of the clicked list item.

|

Remarks

This property returns the clicked list item’s position within the bar item’s BarListItem.Strings collection.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Index property.

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#L269

csharp
MultiPaneSettings settings = MultiPaneSettings.FromJson(dashboardItem.CustomProperties[customPropertyName]);
settings.UseGridLayout = e.Index==0;
string status = settings.UseGridLayout == true ? "Grid" : "Linear";

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

vb
Dim settings As MultiPaneSettings = MultiPaneSettings.FromJson(dashboardItem.CustomProperties(customPropertyName))
settings.UseGridLayout = e.Index=0
Dim status As String = If(settings.UseGridLayout = True, "Grid", "Linear")

See Also

Item

Strings

ListItemClickEventArgs Class

ListItemClickEventArgs Members

DevExpress.XtraBars Namespace