private void OnTapFrom(object sender, DropDownTapArgs e) { this.DropHabitation.DoHideDropDownOnTap(e); this.DropTypeContrat.DoHideDropDownOnTap(e); this.DropSecteurActivite.DoHideDropDownOnTap(e); this.DropSituationFamille.DoHideDropDownOnTap(e); }
private void HandleWindowTapped() { if (_Tap == null && _WindowTapped == false) { _WindowTapped = true; _Tap = new UITapGestureRecognizer((x) => { }); // handle click outside control to close var w = UIApplication.SharedApplication.KeyWindow.RootViewController.View; _Tap.ShouldReceiveTouch = (recognizer, touch) => { var view = UIApplication.SharedApplication.KeyWindow.RootViewController.View; var pos = touch.LocationInView(view); var args = new DropDownTapArgs((float)pos.X, (float)pos.Y); DropDownPicker.SendTapMessage(args); return(false); }; w.AddGestureRecognizer(_Tap); } }