I have a problem integrating the AutoComplete function into my DataGridView. When I customize a cell, I want to open a list of suggestions. Similar to the Google search bar. I've tried a few things that I've found on the internet, but without success. I downloaded a package from https://github.com/Nimgoble/WPFTextBoxAutoComplete with the AutoCompleteFunction, which already exists in WinForms but not in WPF. Here is my Code:
<DataGridTextColumn Width="200" Header=" Column1 " Binding="{Binding Column1}">
<DataGridTextColumn.EditingElementStyle>
<Style TargetType="TextBox">
<Setter Property="MaxLength" Value="50"></Setter>
<Setter Property="behaviors:AutoCompleteBehavior.AutoCompleteItemsSource" Value="{Binding ???, RelativeSource={RelativeSource AncestorType=DataGrid}}" />
<EventSetter Event="TextChanged" Handler="TextBox_TextChanged">
</Style>
</DataGridTextColumn.EditingElementStyle>
</DataGridTextColumn>
I want to add a new class to my Project with a List (strings) with all Suggestions I need. Maybe someone has an Idea? I tried to copy Using WPF TextBox Autocomplete in a DataGrid but I failed.