I am trying to model the behavior of a ComboBox dropdown (or other drop downs for that matter, including context menus) where the drop down closes when you click anywhere el
The templates of the controls you've mentioned are using for the dropdown lists a popup as a container with the StaysOpen property set on false (which is the default i think).
ComboBox template example
The ComboBox is constructed from 2 controls.
Normally the Base is visible. When the user clicks onto the ComboBox, the Base control hides and the DropDownList control shows up. This switch is done on the background, so for the user it seems the control just expanded.
The event you want to catch is done through the DropDownList Window. If you click somewhere onto your client area, the DropDownList Window receives the WM_KILLFOCUS event through it's WndProc(Message% m) method. Then sends to the parent window (the Base control) a WM_COMMAND (OCM_COMMAND) message with WParam=526318 (HIWORD(WParam)=8) and the Base control knows he should hide the DropDownList Window.
So, what you need to do is implement the additional DropDown Window and catch the WM_KILLFOCUS event.