At first the data retrieved and made item source of AutoCompleteBox1 is nothing.
Then at refocus, the data(list) to be made itemsource has some records,
problem
The item source of the autocompletebox 1 is not refreshed!.
Help please.
The new items added to the list must become the itemsource of the autocomplete
Code
Sub AssignToAutoCompleteOfDetails()
''load auto complete box
For Each abcd In DomainService_EditCompany.GECODs
If abcd.codCode = AutoCompleteBox2.Text.Trim Then
list_company.Add(abcd.codDesc.ToString())
End If
Next
AutoCompleteBox1.ItemsSource = list_company
End Sub
This is because even though
list_companyis getting updated with the data, the UI doesn’t know there has been a change. To tackle this Silverlight has an interface know asINotifyPropertyChangedwhich could be implemented and bound to a UI control.But in your case all you have to do is to replace the
List<string>withObservableCollection<string>and addusing System.Collections.ObjectModel;