Prevent AutoCompleteBox from selecting first suggestion item by default

Editors for WPF Forum

Posted 8 months 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 8 months ago]

Comments (3)

Answer - Posted 7 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 7 months ago by Thomas
Avatar

Thanks! When will it be available?

Posted 7 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 (v24.1.4) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.