Imagine the situation you open a WPF Popup(e.g. through ButtonClick).
You have a ListBox directly in the Popup with some items, so you have to be able to scroll.
Imagine that this is your Custom Control and it's located in the ScrollViewer.
Now if you move with your mouse outside from the Popup surface and scroll, what happens?
You scroll up and down but with the Popup opened ! And that's the problem.
The question is, how to detect from inside the Control, that some other unknown Parent Control in the VisualTree has started to scroll ?
and consecutively set IsDropDownOpen = false?