Back to Devexpress

ListBoxEdit.SelectedItem Property

wpf-devexpress-dot-xpf-dot-editors-dot-listboxedit-908a9dd1.md

latest2.4 KB
Original Source

ListBoxEdit.SelectedItem Property

Gets or sets the currently selected item. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public object SelectedItem { get; set; }
vb
Public Property SelectedItem As Object

Property Value

TypeDescription
Object

An object that represents the currently selected item.

|

Remarks

If multiple item selection is enabled, the SelectedItem property returns the first element in the ListBoxEdit.SelectedItems collection.

To obtain the currently selected item’s index, use the ListBoxEdit.SelectedIndex property.

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

mvvm-application-with-wpf-bars/CS/Bars_in_MVVM_Application/MainWindow.xaml#L75

xml
DisplayMember="Subject" ValueMember="Id"
             SelectedItem="{Binding SelectedIssue}">
<dxe:ListBoxEdit.ItemTemplate>

See Also

SelectionMode

ListBoxEdit Class

ListBoxEdit Members

DevExpress.Xpf.Editors Namespace