Ejemplo n.º 1
0
 void DimmingViewTapped(TouchBeginGestureRecognizer sender)
 {
     if (_dlgView.IsCanceledOnTouchOutside)
     {
         _dlgView.DialogNotifierInternal.Cancel();
     }
 }
Ejemplo n.º 2
0
        public ReusableDialog(DialogView view)
        {
            _dlgView = view;

            _overlayView = new UIView()
            {
                BackgroundColor = _dlgView.OverlayColor.ToUIColor(),
                Opaque          = false,
                Alpha           = 0f
            };

            var touchGesture = new TouchBeginGestureRecognizer();

            touchGesture.AddTarget(() => DimmingViewTapped(touchGesture));
            _overlayView.AddGestureRecognizer(touchGesture);


            // Because the process can't be executed until application completely loads,
            // set the action here to execute later on.
            OnceInitializeAction = Initialize;
        }