DotNetKit.Wpf.AutoCompleteComboBox 2.0.1

dotnet add package DotNetKit.Wpf.AutoCompleteComboBox --version 2.0.1
                    
NuGet\Install-Package DotNetKit.Wpf.AutoCompleteComboBox -Version 2.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DotNetKit.Wpf.AutoCompleteComboBox" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DotNetKit.Wpf.AutoCompleteComboBox" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="DotNetKit.Wpf.AutoCompleteComboBox" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DotNetKit.Wpf.AutoCompleteComboBox --version 2.0.1
                    
#r "nuget: DotNetKit.Wpf.AutoCompleteComboBox, 2.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DotNetKit.Wpf.AutoCompleteComboBox@2.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DotNetKit.Wpf.AutoCompleteComboBox&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=DotNetKit.Wpf.AutoCompleteComboBox&version=2.0.1
                    
Install as a Cake Tool

AutoCompleteComboBox for WPF

Announcement: This repository will soon be renamed to a shorter name.

NuGet version

A lightweight ComboBox control that supports filtering (auto completion).

Screenshot

alternate text is missing from this package README image

Usage

Install via NuGet.

Declare XML namespace.

<Window
    ...
    xmlns:dotNetKitControls="clr-namespace:DotNetKit.Windows.Controls;assembly=DotNetKit.Wpf.AutoCompleteComboBox"
    ... >

You can then use AutoCompleteComboBox just like a normal ComboBox, since it inherits from it.

<dotNetKitControls:AutoCompleteComboBox
    SelectedValuePath="Id"
    TextSearch.TextPath="Name"
    ItemsSource="{Binding Items}"
    SelectedItem="{Binding SelectedItem}"
    SelectedValue="{Binding SelectedValue}"
    />

Note that:

  • Set a property path to TextSearch.TextPath property.
    • The path should point to a property that returns a string used to identify items. For example, if each item is a Person object with a Name property, and TextSearch.TextPath is set to "Name", typing "va" will filter out all items whose Name doesn't contain "va".
    • No support for TextSearch.Text.
  • Don't use ComboBox.Items property directly. Use ItemsSource instead.
  • Although the Demo project uses DataTemplate to display items, you can also use DisplayMemberPath.

Configuration

The default settings should work well for most cases, but you can customize the behavior if needed.

<dotNetKitControls:AutoCompleteComboBox
    Setting="..."
    ...
    />
  • Or set AutoCompleteComboBoxSetting.Default to apply to all comboboxes.

Performance

Filtering allows you to add many items without losing usability, but it can affect performance. To improve this, we recommend using VirtualizingStackPanel as the items panel.

Use the ItemsPanel property:

<dotNetKitControls:AutoCompleteComboBox ...>
    <dotNetKitControls:AutoCompleteComboBox.ItemsPanel>
        <ItemsPanelTemplate>
            <VirtualizingStackPanel />
        </ItemsPanelTemplate>
    </dotNetKitControls:AutoCompleteComboBox.ItemsPanel>
</dotNetKitControls:AutoCompleteComboBox>

or declare a style in resources as the Demo app does.

See also WPF: Using a VirtualizingStackPanel to Improve ComboBox Performance for more detailed explanation.

Known Issues

Shared ItemsSource

  • Multiple ComboBoxes can affect each other if they share the same ItemsSource instance.
  • Workaround: Use distinct ItemsSource instance for each AutoCompleteComboBox. For example, wrap it with a ReadOnlyCollection.

Filter Conflict

  • Changing AutoCompleteComboBox.Filter in user code conflicts with the control's internal behavior.
  • Workaround: Avoid changing Filter in user code. Filter ItemsSource instead.
  • There seems to be no reliable way to merge CollectionView filters. Please let me know if you have a solution.

Background Not Applied

ComboBox doesn't appear to support the Background property. No easy fix is known.

Internals

This library is essentially a thin wrapper around the standard ComboBox with additional behaviors.

What Happens Under the Hood

  • Sets IsEditable to true to allow text input
  • Finds the TextBox part (in the ComboBox) to listen to the TextChanged event
  • Opens or closes the dropdown when the text changes (after the debounce timer fires)
    • TextBox selection is carefully saved and restored to not disturb the user
  • Filters the ComboBox items based on the input
  • Handles PreviewKeyDown events (Ctrl+Space) to open the dropdown
Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on DotNetKit.Wpf.AutoCompleteComboBox:

Repository Stars
Slazanger/SMT
Slazanger's Eve Map Tool
hawkeye-stan/msfs-popout-panel-manager
Pop out panel manager for MSFS 2020
Version Downloads Last Updated
2.0.1 67 11/28/2025
2.0.0 377 10/27/2025
1.6.0 38,874 4/22/2023
1.5.0 1,023 4/1/2023
1.4.0 20,825 10/17/2021
1.3.3 24,888 6/8/2020
1.3.1 2,515 4/5/2020
1.3.0 924 3/18/2020
1.2.0 41,412 5/6/2017