Search code examples
silverlightautocompletebox

Silverlight 4 toolkit AutoCompleteBox Text property not working


I capture the KeyUp event on an AutoComplete box from the Silverlight toolkit. If they press Escape I want to clear the value by calling autocompletebox.Text = string.Empty. This works most of the time, but whenever I set this when the whole field is selected it does not work. Is there another property that I should be setting instead of Text?


Solution

  • Try also assigning null to the SelectedItem property.

    BTW Why are you using the toolkit, Silverlight 4 has an AutoCompleteBox, are you using SL3?