Back to Devexpress

AutoSuggestEdit.ItemsSource Property

wpf-devexpress-dot-xpf-dot-editors-dot-autosuggestedit-78e5a20d.md

latest2.7 KB
Original Source

AutoSuggestEdit.ItemsSource Property

Get or sets a collection of items (suggestions) displayed within the editor’s dropdown. 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 ItemsSource { get; set; }
vb
Public Property ItemsSource As Object

Property Value

TypeDescription
Object

An object that represents the data source from which the AutoSuggestEdit retrieves a list of suggestions.

|

Remarks

The AutoSuggestEdit editor does not iterate the source itself. The assigned item collection is passed to the editor’s drop down.

The control in the editor’s popup processes the ItemsSource collection. You can get this control by using the PopupElement property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ItemsSource 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-data-grid-use-autosuggesteditsettings/CS/MainWindow.xaml.cs#L30

csharp
ActiveEditor.QuerySubmitted -= QuerySubmitted;
ActiveEditor.ItemsSource = null;
ActiveEditor = null;

wpf-data-grid-use-autosuggesteditsettings/VB/MainWindow.xaml.vb#L32

vb
RemoveHandler ActiveEditor.QuerySubmitted, AddressOf QuerySubmitted
ActiveEditor.ItemsSource = Nothing
ActiveEditor = Nothing

See Also

AutoSuggestEdit Class

AutoSuggestEdit Members

DevExpress.Xpf.Editors Namespace