HandyControl
HandyControl copied to clipboard
Can't clear the autocomplete textbox
Describe the bug
Trying to programmatically clear the autocomplete textbox using:
firstNameText.Text = string.Empty;
or
firstNameText.Text = ""
and also
firstNameText.PreviewTextInput -= firstNameText_Preview;
firstNameText.Text = string.Empty;
firstNameText.InvalidateVisual();
firstNameText.PreviewTextInput += firstNameText_Preview;
but the autocompletetextbox won't clear.
Steps to reproduce the bug
Create an autocompletetextbox Bind that autocompletetextbox's itemsource to an observablecollection. Create a button Attach a function to that button that clears the autocompletetextbox.Text.
Pick a selection from the dropdown. Press the button you created.
Expected behavior
I expected the text to clear.
Screenshots
No response
NuGet package version
HandyControl 3.4.0
IDE
Visual Studio 2019
Framework type
No response
Windows version
May 2021 Update (19043)
Additional context
No response
Noticed that when I use firstNameText.Text = "" and then write the value of that text property to the debug output, it shows that it's changing. The property changes to an empty string, but the autocompletetextbox still shows the name that I entered previously.
I have the same problems. Any update done from vm seems to be ignored in the text field of AutoCompleteTextBox. Any update?