Quantcast
Channel: Silverlight Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 801

Commented Issue: AutoCompleteBox do not show dropdown when PopulateComplete() [5995]

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

FilterMode="None" is required


Viewing all articles
Browse latest Browse all 801

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>