System.Windows.Controls.AutoCompleteBox.PopulateDropDown C# (CSharp) Méthode

PopulateDropDown() private méthode

Handles the timer tick when using a populate delay.
private PopulateDropDown ( object sender, EventArgs e ) : void
sender object The source object.
e EventArgs The event arguments.
Résultat void
        private void PopulateDropDown(object sender, EventArgs e)
        {
            if(_delayTimer != null)
            {
                _delayTimer.Stop();
            }

            // Update the prefix/search text.
            SearchText = Text;

            // The Populated event enables advanced, custom filtering. The 
            // client needs to directly update the ItemsSource collection or
            // call the Populate method on the control to continue the 
            // display process if Cancel is set to true.
#if SILVERLIGHT
            PopulatingEventArgs populating = new PopulatingEventArgs(SearchText);
#else
            PopulatingEventArgs populating = new PopulatingEventArgs(SearchText, PopulatingEvent);
#endif

            OnPopulating(populating);
            if(!populating.Cancel)
            {
                PopulateComplete();
            }
        }