SearchableComboBox 1.1.1
dotnet add package SearchableComboBox --version 1.1.1
NuGet\Install-Package SearchableComboBox -Version 1.1.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="SearchableComboBox" Version="1.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SearchableComboBox --version 1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SearchableComboBox, 1.1.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.
// Install SearchableComboBox as a Cake Addin #addin nuget:?package=SearchableComboBox&version=1.1.1 // Install SearchableComboBox as a Cake Tool #tool nuget:?package=SearchableComboBox&version=1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SearchableComboBox: A Custom ComboBox Control
SearchableComboBox
is an enhanced version of the standard ComboBox control, providing users with additional features that significantly improve its utility in modern applications. This control is designed to address common use cases where a regular ComboBox may fall short.
Features:
- Search Functionality: As the name suggests,
SearchableComboBox
offers an embedded search box. This search box allows users to quickly filter through the items in the dropdown, making it particularly useful for ComboBoxes with a large number of items. - Custom Sorting: The control supports custom sort comparers. This means you can define your own logic to sort the items in the dropdown.
- Placeholder Watermark: A placeholder can be displayed inside the ComboBox when no item is selected, guiding the user on the expected input or simply for improved aesthetics.
- Enhanced UI Feedback: The control provides visual feedback when no matches are found for a search term.
How to use:
1. Include the Namespace:
First, make sure to reference the namespace where the SearchableComboBox
resides.
xmlns:local="clr-namespace:SearchableComboBox"
2. Use the Control:
You can use the SearchableComboBox
control just like you would a regular ComboBox, but with the added properties and features.
<local:SearchableComboBox Placeholder="Select an item..." IsSearchEnabled="True">
</local:SearchableComboBox>
3. Properties:
- IsSearchEnabled: A boolean property that controls whether the search functionality is enabled or not.
- Placeholder: A string property to set the watermark text when no item is selected.
- CustomSort: An
IComparer
property to provide custom sorting logic for the items in the dropdown. - SearchTerm: A string property that reflects the current search term. This can be bound to if necessary.
Notes:
- The control uses a
DebounceTimer
to ensure that filtering isn't too aggressive. This means there's a slight delay from when a user stops typing to when the filter is applied. This delay is set to 300 milliseconds by default. - The control reverts the selection to the last selected item if a user's search yields no results.
- Debug lines are present in the code (controlled by the
debug
flag) for developers to understand the control's flow and operations. These can be removed or toggled off in production.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net47 is compatible. net471 is compatible. net472 is compatible. net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.7
- PresentationFramework.Aero2 (>= 1.0.1)
-
.NETFramework 4.7.1
- PresentationFramework.Aero2 (>= 1.0.1)
-
.NETFramework 4.7.2
- PresentationFramework.Aero2 (>= 1.0.1)
-
.NETFramework 4.8
- PresentationFramework.Aero2 (>= 1.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.