private void RaiseExpandCollapseAutomationEvent(bool oldValue, bool newValue) { AutoCompleteBoxAutomationPeer peer = UIElementAutomationPeer.FromElement(this) as AutoCompleteBoxAutomationPeer; if(peer != null) { peer.RaiseExpandCollapseAutomationEvent(oldValue, newValue); } }