<p>According to this http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k(SYSTEM.WINDOWS.CONTROLS.AUTOCOMPLETEBOX.POPULATECOMPLETE)&rd=true the dropdown should show up after PopulateComplete(). But it doesn't!</p>
<p> </p>
<p>Here's my code:</p>
<p> </p>
<p><Grid x:Name="LayoutRoot"></p>
<p> <sdk:AutoCompleteBox Height="28" HorizontalAlignment="Left" Margin="65,108,0,0" Name="acbCitytown" VerticalAlignment="Top" Width="304" Populating="acbCitytown_Populating" /></p>
<p></Grid></p>
<p> </p>
<p>private void acbCitytown_Populating(object sender, PopulatingEventArgs e)</p>
<p> {</p>
<p> e.Cancel = true;</p>
<p> </p>
<p> // load cities</p>
<p> string phrase = e.Parameter;</p>
<p> </p>
<p> SomeService.ServiceClient svc = new SomeService.ServiceClient();</p>
<p> svc.GetCitiesByContextCompleted += new EventHandler<SomeService.GetCitiesByContextCompletedEventArgs>(svc_GetCitiesByContextCompleted);</p>
<p> svc.GetCitiesByContextAsync(phrase);</p>
<p> }</p>
<p> </p>
<p> void svc_GetCitiesByContextCompleted(object sender, KladrService.GetCitiesByContextCompletedEventArgs e)</p>
<p> {</p>
<p> if (e.Error != null)</p>
<p> {</p>
<p> return;</p>
<p> }</p>
<p> if (e.Result != null)</p>
<p> {</p>
<p> ObservableCollection<CitiesData> cities = e.Result;</p>
<p> acbCitytown.ItemsSource = cities;</p>
<p> //acbCitytown.ItemsSource = new string[] { "123", "234", "35434", "234342" };</p>
<p> acbCitytown.PopulateComplete();</p>
<p> }</p>
<p> }</p>
<p> </p>
<p>I even tried to use dummy array - does not work!</p>
Comments: ** Comment from web user: middlewest **
<p> </p>
<p>Here's my code:</p>
<p> </p>
<p><Grid x:Name="LayoutRoot"></p>
<p> <sdk:AutoCompleteBox Height="28" HorizontalAlignment="Left" Margin="65,108,0,0" Name="acbCitytown" VerticalAlignment="Top" Width="304" Populating="acbCitytown_Populating" /></p>
<p></Grid></p>
<p> </p>
<p>private void acbCitytown_Populating(object sender, PopulatingEventArgs e)</p>
<p> {</p>
<p> e.Cancel = true;</p>
<p> </p>
<p> // load cities</p>
<p> string phrase = e.Parameter;</p>
<p> </p>
<p> SomeService.ServiceClient svc = new SomeService.ServiceClient();</p>
<p> svc.GetCitiesByContextCompleted += new EventHandler<SomeService.GetCitiesByContextCompletedEventArgs>(svc_GetCitiesByContextCompleted);</p>
<p> svc.GetCitiesByContextAsync(phrase);</p>
<p> }</p>
<p> </p>
<p> void svc_GetCitiesByContextCompleted(object sender, KladrService.GetCitiesByContextCompletedEventArgs e)</p>
<p> {</p>
<p> if (e.Error != null)</p>
<p> {</p>
<p> return;</p>
<p> }</p>
<p> if (e.Result != null)</p>
<p> {</p>
<p> ObservableCollection<CitiesData> cities = e.Result;</p>
<p> acbCitytown.ItemsSource = cities;</p>
<p> //acbCitytown.ItemsSource = new string[] { "123", "234", "35434", "234342" };</p>
<p> acbCitytown.PopulateComplete();</p>
<p> }</p>
<p> }</p>
<p> </p>
<p>I even tried to use dummy array - does not work!</p>
Comments: ** Comment from web user: middlewest **
FilterMode="None" is required