wpf-devexpress-dot-xpf-dot-editors-dot-listboxedit-908a9dd1.md
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
public object SelectedItem { get; set; }
Public Property SelectedItem As Object
| Type | Description |
|---|---|
| Object |
An object that represents the currently selected item.
|
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
DisplayMember="Subject" ValueMember="Id"
SelectedItem="{Binding SelectedIssue}">
<dxe:ListBoxEdit.ItemTemplate>
See Also