HandyControl icon indicating copy to clipboard operation
HandyControl copied to clipboard

Can't clear the autocomplete textbox

Open BigfootNick opened this issue 2 years ago • 2 comments

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

BigfootNick avatar Mar 15 '23 23:03 BigfootNick

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.

BigfootNick avatar Mar 17 '23 18:03 BigfootNick

I have the same problems. Any update done from vm seems to be ignored in the text field of AutoCompleteTextBox. Any update?

TheFedex87 avatar May 24 '23 15:05 TheFedex87