Back to Devexpress

BarListItem.ItemIndex Property

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

latest2.6 KB
Original Source

BarListItem.ItemIndex Property

Specifies the index of the selected(checked) item in a list.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(-1)]
public virtual int ItemIndex { get; set; }
vb
<DefaultValue(-1)>
Public Overridable Property ItemIndex As Integer

Property Value

TypeDefaultDescription
Int32-1

The selected(checked) item index.

|

Remarks

Use this property to select a specific item in a list at runtime. The default value means that no item is selected. The item index is zero-based.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ItemIndex 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#L186

csharp
}
    layoutModeBarItem.ItemIndex = settings.UseGridLayout? 0:1;
}

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

vb
End If
    layoutModeBarItem.ItemIndex = If(settings.UseGridLayout, 0, 1)
End If

See Also

BarListItem Class

BarListItem Members

DevExpress.XtraBars Namespace