Back to Devexpress

LookUpEditBase.SelectedItem Property

wpf-devexpress-dot-xpf-dot-editors-dot-lookupeditbase-e80a349d.md

latest2.4 KB
Original Source

LookUpEditBase.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

Use the LookUpEditBase.SelectedIndex property to select an item by its index.

If the editor represents a checked combo box, use the LookUpEditBase.SelectedItems property to obtain a collection of selected items. In this instance, if multiple items are selected, the SelectedItem property returns the first selected item.

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.

wpf-richedit-document-encryption/CS/DXRichEdit_Encryption/MainWindow.xaml.cs#L37

csharp
encryptionComboBoxEdit.ItemsSource = array;
    encryptionComboBoxEdit.SelectedItem = EncryptionType.Strong.ToString();
}

See Also

LookUpEditBase Class

LookUpEditBase Members

DevExpress.Xpf.Editors Namespace