Hi Georgi, I tried this demo and it worked as desired in most cases. I have narrowed down our issue to the LostFocus and
sender, KeyboardFocusChangedEventArgs e)
autoComplete.SelectedItem = ((ViewModel) DataContext).LastItem;
This method will coerce the SelectedItem to be the previous valid result if SearchText is not empty and not valid when losing focus.
The problem is that in some cases LostFocus / LostKeyboardFocus fire unexpectedly.
Type any single number into the AutoCompleteBox and click an item in the list. The Item will be selected as expected and LostFocus will not fire. Do this as many times as you wish, it will consistently reproduce the desired effect.
Type into the box so that there is only one selection available and click the item. LostFocus will fire triggering the coersion, this is not expected nor desired. This is consistently reproducible.