Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a button to the right of AutoCompleteBox to show the complete list (example provided) #15416

Open
buzzware opened this issue Apr 17, 2024 · 2 comments

Comments

@buzzware
Copy link

buzzware commented Apr 17, 2024

Is your feature request related to a problem? Please describe.

ComboBox strictly allows the user to select an item from a preloaded list. AutoCompleteBox allows the user to enter a few characters and see items that match, which may be the results of a live query.
But often something in between is required. In particular, the ability to either search for an item OR drop down the complete list by tapping a down-arrow-like button to select from a predefined list.

Describe the solution you'd like

The AutoCompleteBox should have the option of showing a drop down button, which shows the list when tapped. That may be the list that ItemSource is already set to, or what ItemSource is set to after Populating+PopulateComplete() or the results of AsyncPopulator. If the textbox is empty, then all results or all matches should be shown. Empty string doesn't match anything for the built in filter options, so it requires special logic to show all.

Describe alternatives you've considered

Avalonia users have achieved similar before (see below) but I think it should be in the standard control.
I used their work to create this example repository https://github.com/buzzware/AutoCompleteBoxPlay
Note that I wasn't able to get the drop list to stay down properly when the dropdown button is tapped on the AsyncPopulator example (B). There is a bug in the behavior that I haven't been able to solve.
This example repo is very hacky code and I have very little WPF or Avalonia experience, so I'd like to see a proper solution in the standard control.

  1. AutoCompleteBox and ComboBox #11533
  2. Custom AutoCompleteBox #11889

Additional context

No response

@buzzware buzzware changed the title Add a button to the right of AutoCompleteBox to show the complete list Add a button to the right of AutoCompleteBox to show the complete list (example provided) Apr 17, 2024
@timunie
Copy link
Contributor

timunie commented Apr 17, 2024

For me its a duplicate of #205

@timunie
Copy link
Contributor

timunie commented Apr 17, 2024

Also an idea: AvaloniaUI/Avalonia.Labs#60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants