Prevent AutoCompleteBox from selecting first suggestion item by default

Editors for WPF Forum

Posted 1 year ago by Thomas
Version: 24.1.2
Avatar

I would like to use the AutoCompleteBox as a search field:

  • The user enters text and presses Enter to start a search.
  • Optionally, the user can select an entry from the suggestion list.

This is currently not possible because the AutoCompleteBox always selects the first entry in the suggestion list and therefore a suggestion is always transferred to the text field when Enter is pressed. Therefore the entered search text is always overwritten by the selected suggestion.

Can I prevent the AutoCompleteBox from selecting an entry from the suggestion list by default? It would be useful if you could control the auto-select behavior.

[Modified 1 year ago]

Comments (3)

Answer - Posted 11 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Thomas,

We will add an AutoCompleteBox.CanAutoSelectFirstItem property for the next build that you can set to false to prevent this default behavior.


Actipro Software Support

Posted 11 months ago by Thomas
Avatar

Thanks! When will it be available?

Posted 11 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

We would expect it sometime in July.


Actipro Software Support

The latest build of this product (v25.1.0) was released 27 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.