You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

wpftextboxautocompletederivative

Package Overview
Dependencies
Maintainers
0
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

wpftextboxautocompletederivative

0.0.0
unpublished
nugetNuGet
Maintainers
0
Source

WPFTextBoxAutoCompleteDerivative

Extends the WPF TextBox control with auto-completion suggestions.
This is based on Nimgoble's WPFTextBoxAutoComplete, and is designed for .NET Core 6

Differences

  • Shortened and simplified syntax.
  • Commit is now triggered when the textbox loses focus.
  • Commit key can be changed from enter to another key.

Usage

  • Install the package via NuGet

    	PM> Install-Package WPFTextBoxAutoCompleteDerivative
    
  • Add a reference to the library in the .xaml file you want to use it in.

    	xmlns:behaviors="clr-namespace:WPFTextBoxAutoComplete;assembly=WPFTextBoxAutoCompleteDerivative"
    
  • Create a textbox and bind the ItemsSource property to any type that implements IEnumerable<String>.

    	<TextBox 
    		Width="250"
    		HorizontalAlignment="Center"
    		Text="{Binding TestText, UpdateSourceTrigger=PropertyChanged}"
    		behaviors:AutoComplete.ItemsSource="{Binding TestItems}"
    	/>
    

Properties

PropertyTypeDefaultDescription
ItemsSourceIEnumerable<string>nullSets the source for auto completion suggestions.
StringComparisonModeStringComparisonOrdinalIgnoreCaseChanges the string comparison type used when matching user input to possible suggestions.
Prefixchar?nullWhen set to a non-null character, that character must be entered by the user for suggestions to appear.
CommitKeyKeyEnterThis changes which key the user should press to select a suggestion.

Examples

Case-Sensitive Matching
```csharp
	<TextBox 
		 Width="250"
		 HorizontalAlignment="Center"
		 Text="{Binding TestText, UpdateSourceTrigger=PropertyChanged}" 
		 behaviors:AutoComplete.ItemsSource="{StaticResource TestData}"
		 behaviors:AutoComplete.StringComparisonMode="Ordinal"
	/>
```

Requires '@' prefix to show suggestions.
``` csharp
	<TextBox 
		Width="250"
		HorizontalAlignment="Center"
		Text="{Binding TestText, UpdateSourceTrigger=PropertyChanged}" 
		behaviors:AutoComplete.ItemsSource="{Binding TestItems}"
		behaviors:AutoComplete.Prefix="@"
	/>
```

Keywords

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts