You can do this in a pseudo kind of way.
If you place a blank or semi-transparent full sized panel below your panel, which doesn't consume any click events, then display your panel on top of this. Consume the click events or whatever and then hide both panels at the same time.