vain0x / dotnetkit.wpf.autocompletecombobox Goto Github PK
View Code? Open in Web Editor NEWComboBox with filtering (auto-complete) for WPF
License: MIT License
ComboBox with filtering (auto-complete) for WPF
License: MIT License
Hi @vain0x,
After updated to the latest version of the nuget package, I still have the issue fixed by my PR on my app.
So I used DotPeek to uncompile the latest version and found that the code doesn't contain my latest fix.
Current source :
I don't think this is intended, so can you release a new version with the fix ?
Thank you.
One asked me to do that. Is just changing .net45
to .net40
enough?
Hello, I am using this control well. Have you ever wanted to change the MaxSuggestionCount inside AutoCompleteComboBoxSetting, is there a way? If yes, I would appreciate it if you could show me an example.
vain0, thank you for this piece of code. ComboBox is brilliant and perfectly works out-of-box.
I offer to improve suggestions orger. For example:
Text input: it
Current result:
git
item
iterate
community
Result requested: strings starting with it
placed on the top of list:
item
iterate
git
community
Is there a way to add such tweak?
I had been using the KeyDown
event so then when I press enter in the combobox, it can start searching. Now that the first enter key input is consumed by the AutoCompleteComboBox control itself, I have to press enter twice. I mean, in Google Search, you can just select an item in the suggestion and it starts searching immediately, without your pressing enter again.
The solution I have thought of is having a new event for "input confirmed". That is, when the user just types something and presses enter, this event is raised with the text that the user typed. When the user types something and presses the arrow keys to select an item in the autocomplete list and presses enter, this event should also be raised with the selected list item's text.
Is there a way to implement automatically transliteration?
For example if I print some cyrillic symbols, but list contains only eng strings.
In this case Combobox offers suggestions as my keyboard layout is changed to eng.
when I type a word the dropdown will show the items matched.And I can select one by Up and Down in keyboards,the edittextbox will changed base on my selection, and it keep all the text selected.There‘s no problem by now.
However,if I press a new key in keyboards at this time.the edittextbox and the dropdownlist will be changed correspondingly.But I cannot select the item in the dropdown list by Up and Down.unless empty the edittextbox
Can I use in winforms project?
Since the 1.5 update, whenever ItemsSource
is changed, SelectedItem
is set to the first item in ItemsSource
. This overwrites any selection that the user might have previously made.
If SelectedItem
exists in the new ItemsSource
, it shouldn't change. If it doesn't, the selection should be cleared.
See the demo in this branch. Specifically, this commit.
Please add a link to the github project (https://github.com/vain0x/DotNetKit.Wpf.AutoCompleteComboBox) in the description of your nuget
Hello friends
First of all I apologize for asking this question here, since I do not think it is the appropriate channel, but it is the place that I see closest to a solution to my problem.
I want to use this control, but in my case I do not have a pre-loaded collection of elements, the data source has more than 30,000 records, therefore my intention is to load the data as the user enters the text.
For this reason I need to obtain the content that the user has typed, for that I create a property in my viewmodel which I link to the Text property of the ComboBox, when the property has content, I execute the query against the database.
Everything seems to work as expected, until I choose an item from the suggestion list and this causes the content of the Text property to disappear, destroying all my hopes.
Is it possible to obtain the desired behavior by establishing the correct properties or following a specific pattern?
I would appreciate any help, a link or any idea that puts me in the right direction, I have been watching content on the web for more than a week without finding a satisfactory solution to a problem that, in my opinion, does not have the greatest complexity
Thank you very much for taking the time to read this.
Hi, Is there a way to have the drop down always shown? It only shows when the box is not blank. Is there also a way to reject any input thats not part of the ItemsSource? Say I enter an invalid value or something.
text
gets filled by resolving DisplayMemberPath
and TextFromItem(SelectedItem)
gets filled by resolving TextSearch.TextPath
.SelectedItem
gets unset immediatly after selection.
I tried removing TextFromItem(SelectedItem) == text
and it fixed this problem and didn't introduce any new problem as far as I can tell.
Hi, is there any changes to sign assembly with strong name? :)
Is there any way to take multiple selection with this control?
Hello! Awesome package here. Sadly there is a bug where cursor won't blink sometimes. It's only after I type the first letter.
This might be helpful: https://stackoverflow.com/questions/8010272/textbox-cursor-is-not-blinking
It seems that when there is no matching item in the list, it still shows an empty list. Shouldn't it not display an empty list?
Hi,
your ComboBox is great and works fine. However i discovered a little issue and i would be very greatful if you could solve that:
I use the combobox like this:
<dotNetKitControls:AutoCompleteComboBox ItemsSource="{Binding myList}" DisplayMemberPath="myStringItemOfmyList" TextSearch.TextPath="myStringItemOfmyList" SelectedItem="{Binding anotherValue}" SelectionChanged="Method_SelectionChanged" />
The first item of the list is auto selected when starting the program. Also this item is on focus (the text is marked) when starting.
When I now press any key to clear the marked text and search for another string, this new entered character is displayed for a very short moment. After that, the ComboBox jumps back to the initially displayed value.
Also when I delete characters of the current displayed string one after another, the following behavour occurs: Once i deleted enough characters, that more than one string would match on my current input, the ComboBox also jumps back to the initial value.
Hope my description helps. If you need more info, please ask me.
Thanks a lot in advance vor your support.
I've come across this autocomplete but faced an issue when emptying the text search or changing the text.
Indeed, after the first filter, the ItemsSource keeps the old filter and does not reset the collection so every research after that is compromised.
Way to reproduce in the demo :
I'm not allowed to push a fix on the repo so here we are :
In the component source code (AutoCompleteComboBox.xaml.cs), method UpdateSuggestionList, defaultItemsFilter should be set to null to be able to apply the new filter on the initial items collection
if (text == previousText) return;
// Fix : remove previous filter if the text to search does not contains or is smaller than the previous text
if (previousText?.Length > text?.Length || !text.Contains(previousText ?? string.Empty))
{
defaultItemsFilter = null;
}
// End of fix
previousText = text;
Would be nice to have a setting to only select on pressing Enter, currently, when you press up/down arrows it changes the selection.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.