protected override bool HitTestOverride(Point position) { // receive a click if there is a non "StaysOpen" child opened return(VisualChildren.Any(child => GetIsOpen(child) && !GetStaysOpen(child))); }