If the drop down get opened (which usually happens on text changed) before the ItemsSource is assigned, the no results presenter is never replaced with the list of results after the ItemsSource is set. This may happen if you delay the ItemsSource settings. A possible scenario is if you fetch your data from a service or using another type of async approach where the ItemsSource is assigned few moments after the TextChanged event was fired.
To work this around, you can manually update the Visibility of the items host or re-open the drop down after the ItemsSource is assigned. For example, you can create a custom RadAutoSuggestBox and override its OnPropertyChanged method. This will allow you to update the items host visibility on ItemsSource changed.
public class CustomAutoSuggestBox : RadAutoSuggestBox
{
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
{
base.OnPropertyChanged(e);
if (e.Property.Name == "ItemsSource")
{
var listBox = (RadListBox)GetTemplateChild("PART_ItemsHost");
listBox.Visibility = listBox.Items.Count > 0 ? Visibility.Visible : Visibility.Collapsed;
}
}
}
If you call the Focus method of RadAutoSuggestBox, the focus doesn't propagate to the child RadWatermarkTextBox.
To work this around, get the RadWatermarkTextBox control and call its Focus method instead.
var textBox = this.autoSuggestBox.FindChildByType<RadWatermarkTextBox>();
textBox .Focus();
// Note that this code should be executed after the RadAutoSuggestBox control is loaded (on the Loaded event or later).