HandyOrg / HandyOrg/HandyControl
Combobox AutoComplete Limit SearchFunc
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.2k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
I settted Combobox's AutoComplete true and IsEditable true, when I input a latter in the textbox, it auto setted the value matched first letters in the
Combobox's ItemSource even though the Combobox's ItemSource has many items matched the textbox's value。I thought mybe I can use the SearchFunc to solve this problem. But I found that when the textbox's matching first letters,It triggered autoComplete effect. Either it trriger the SearchFunc. Why I can not set the AutoComplete false but can use the SearchFunc ? I can't understand.
Steps to reproduce the bug
1.Set the Combobox's AutoComplete false, IsEditable true
2.Set SearchFunc =(param, p2) => {
var source = param.Cast<KeyValuePair<string, string>>();
return source.Where(k => k.Key.Contains(p2.ToString())).Select(k => k.Key).ToList();
};
3.Input some letters in Combobox's textbox, it can't trigger the SearchFunc
Expected behavior
when setting the Combobox's AutoComplete false, IsEditable true, if I set SearchFunc , It can trigger SearchFunc binding function.
Screenshots
NuGet package version
None
IDE
No response
Framework type
No response
Windows version
No response
Additional context
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the WPF ComboBox implementation and the code paths for AutoComplete, IsEditable, and SearchFunc. Reproduce the listed settings with an ItemSource and typing input, then verify whether SearchFunc runs when AutoComplete is false; done means the expected callback behavior is demonstrated and covered against regression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100