Add TapgestureRecognizer for Close Function when Background is pressed.