Exemplo n.º 1
0
        public void MaskHasDismissGestureRecognizer()
        {
            SetMainPage();
            var dialogService = CreateDialogService();

            DialogMock.ConstructorCallback = v => DialogLayout.SetCloseOnBackgroundTapped(v, true);
            dialogService.ShowDialog(DialogMockViewName);

            var mainPage = _currentApp.MainPage as ContentPage;
            var layout   = mainPage.Content as AbsoluteLayout;
            var mask     = layout.Children[1];

            Assert.Single(mask.GestureRecognizers);
        }
Exemplo n.º 2
0
        public void MaskHasDismissGestureRecognizer()
        {
            SetMainPage();
            var dialogService = CreateDialogService();

            DialogMock.ConstructorCallback = v => DialogLayout.SetCloseOnBackgroundTapped(v, true);
            dialogService.ShowDialog(DialogMockViewName);

            Assert.Single(_currentApp.MainPage.Navigation.ModalStack);
            var dialogPage = _currentApp.MainPage.Navigation.ModalStack.First() as DialogPage;

            Assert.NotNull(dialogPage);
            var layout = dialogPage.Content as AbsoluteLayout;
            var mask   = layout.Children[0];

            Assert.Single(mask.GestureRecognizers);
        }