System.Windows.Controls.AutoCompleteBox.CloseDropDown C# (CSharp) Method

CloseDropDown() private method

Private method that directly closes the popup, flips the Checked value, and then fires the Closed event.
private CloseDropDown ( bool oldValue, bool newValue ) : void
oldValue bool The old value.
newValue bool The new value.
return void
        private void CloseDropDown(bool oldValue, bool newValue)
        {
            if(_popupHasOpened)
            {
                if(SelectionAdapter != null)
                {
                    SelectionAdapter.SelectedItem = null;
                }
                if(DropDownPopup != null)
                {
                    DropDownPopup.IsOpen = false;
                }
#if SILVERLIGHT
                OnDropDownClosed(new RoutedPropertyChangedEventArgs<bool>(oldValue, newValue));
#else
                OnDropDownClosed(new RoutedPropertyChangedEventArgs<bool>(oldValue, newValue, DropDownClosedEvent));
#endif
            }
        }