Align AutoSuggestBox with SearchTextBox's behavior in the default Windows 11 Fluent-enabled app
@pomianowski is already working on this.
Since Jul 30, 2022.
- Dominant language
- C#
- Stars
- 9.6k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
In Windows 11, Search text box operates in the following manner:
- User types text into the search box
- User clicks on search button
- System performs search and shows results
However, AutoSuggestBox while looking similar to the Search Box in various Fluent UI-based apps behaves differently:
- User types text into the search box
- If system has no auto-suggestions for this box, QuerySubmitted event never fires
- If system has an auto-suggestions list provided for this box, QuerySubmitted event always fires as long as text changes happened and text query isn't empty
You can see that in apps like Media Player and Settings the behavior differs.
Describe the solution you'd like
A better solution would be like this:
Either adapt this control to behave more like a SearchTextBox with enabled auto-suggestions or build a separate SearchTextBox
Desired behavior:
- No matter if developer have supplied auto-suggestions or not, control can fire QuerySubmitted event
- Control doesn't fire QuerySubmitted event but does it when user clicked on Search button manually or pressed Enter on their keyboard
- For backwards compatibility, control can have a new property like SearchMode with the default value set to Immediate, and second one set to Delayed, enabling the aforementioned behavior
Describe alternatives you've considered
I've used the really old SearchTextBox originally made for WPF in 2009, and styled it to resemble AutoSuggestBox instead. However it lacks auto-suggestions.
Additional context
Love WPFUI!
Contributor guide
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.
Assessment
This issue has not been assessed yet.