Example #1
0
 private void ShowDialog(object sender, RoutedEventArgs e)
 {
     // Shows the dialog used for creating/editing a board
     // Hides the EditConfirmationFlyout if user chose to edit board
     if (ActiveFlyout != null)
     {
         ActiveFlyout.Hide();
     }
 }
Example #2
0
        private async void ShowDialog(object sender, RoutedEventArgs e)
        {
            //ActiveFlyout = FlyoutBase.GetAttachedFlyout((FrameworkElement)sender);
            //FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);

            // This function shows the dialog used for Creating/Editing a board
            // Hides the EditConfirmationFlyout if user chose to edit board
            if (ActiveFlyout != null)
            {
                ActiveFlyout.Hide();
            }

            var dialog = new EditBoardDialogView(ViewModel);
            var result = await dialog.ShowAsync();
        }
        public async Task CanOpenFlyoutByTapping()
        {
            TestCleanupWrapper cleanup;

            Grid       rootPanel            = null;
            Grid       root                 = null;
            TextBlock  dateText             = null;
            FlyoutBase flyout               = null;
            CalendarDatePickerHelper helper = new CalendarDatePickerHelper();
            await helper.PrepareLoadedEvent();

            Windows.UI.Xaml.Controls.CalendarDatePicker cp = await helper.GetCalendarDatePicker();

            rootPanel = await CreateTestResources();

            // load into visual tree
            await RunOnUIThread(() =>
            {
                rootPanel.Children.Append(cp);
            });

            helper.WaitForLoaded();

            await TestServices.WindowHelper.WaitForIdle();

            await RunOnUIThread(() =>
            {
                root     = Grid(helper.GetTemplateChild("Root"));
                dateText = TextBlock(helper.GetTemplateChild("DateText"));

                VERIFY_IS_NOT_NULL(root);
                VERIFY_IS_NOT_NULL(dateText);

                flyout = FlyoutBase.GetAttachedFlyout(root);
                VERIFY_IS_NOT_NULL(flyout);
            });

            helper.PrepareOpenedEvent();

            TestServices.InputHelper.Tap(dateText);

            helper.WaitForOpened();

            await TestServices.WindowHelper.WaitForIdle();

            helper.PrepareClosedEvent();

            await RunOnUIThread(() =>
            {
                // close the flyout before exiting.
                flyout.Hide();
            });

            helper.WaitForClosed();

            await TestServices.WindowHelper.WaitForIdle();
        }
Example #4
0
        public void HideFlyout(Button attachedFlyoutButton)
        {
            FlyoutBase attachedFlyout = attachedFlyoutButton.Flyout;

            if (attachedFlyout != null)
            {
                attachedFlyout.Hide();
            }
        }
        private void NotesGridView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
        {
            if (CanReorderItems)
            {
                ReorderMode = ListViewReorderMode.Enabled;
            }

            if (openedFlyout != null)
            {
                openedFlyout.Hide();
            }
        }
Example #6
0
 private void ShowHide()
 {
     if (FlyoutIsOpen)
     {
         FlyoutBase.ShowAttachedFlyout(AssociatedObject);
     }
     else
     {
         if (_flyout != null)
         {
             _flyout.Hide();
         }
     }
 }
Example #7
0
        public void Cancel()
        {
            //HRESULT hr = S_OK;

            //IFC(__super::Cancel());
            _tcs.TrySetCanceled();


            //if (m_spPendingFlyout)
            //{
            //	IFC(m_spPendingFlyout->Hide());
            //}

            if (m_spPendingFlyout != null)
            {
                m_spPendingFlyout.Hide();
            }

            //Cleanup:
            //return hr;
        }
        public async Task PressingDoesNotOpenMenuFlyout()
        {
            TestCleanupWrapper cleanup;

            Grid       rootPanel = null;
            Grid       root      = null;
            TextBlock  dateText  = null;
            FlyoutBase flyout    = null;

            CalendarDatePickerHelper helper = new CalendarDatePickerHelper();
            await helper.PrepareLoadedEvent();

            Windows.UI.Xaml.Controls.CalendarDatePicker cp = await helper.GetCalendarDatePicker();

            var gridPointerPressedEvent        = new Event();
            var gridPointerPressedRegistration = CreateSafeEventRegistration <UIElement, PointerEventHandler>("PointerPressed");

            rootPanel = await CreateTestResources();

            // load into visual tree
            await RunOnUIThread(() =>
            {
                rootPanel.Children.Append(cp);
                cp.MinDate = ConvertToDateTime(1, 2000, 1, 1);
                cp.MaxDate = ConvertToDateTime(1, 2002, 1, 1);
                cp.Date    = ConvertToDateTime(1, 2001, 1, 1);

                gridPointerPressedRegistration.Attach(rootPanel,
                                                      (object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs args) =>
                {
                    gridPointerPressedEvent.Set();
                });
            });

            helper.WaitForLoaded();

            await TestServices.WindowHelper.WaitForIdle();

            await RunOnUIThread(() =>
            {
                root     = Grid(helper.GetTemplateChild("Root"));
                dateText = TextBlock(helper.GetTemplateChild("DateText"));

                VERIFY_IS_NOT_NULL(root);
                VERIFY_IS_NOT_NULL(dateText);

                flyout = FlyoutBase.GetAttachedFlyout(root);
                VERIFY_IS_NOT_NULL(flyout);
            });

            await TestServices.WindowHelper.WaitForIdle();

            helper.PrepareOpenedEvent();

            TestServices.InputHelper.Tap(dateText);

            helper.WaitForOpened();

            await TestServices.WindowHelper.WaitForIdle();

            helper.PrepareClosedEvent();

            await RunOnUIThread(() =>
            {
                // close the flyout before exiting.
                flyout.Hide();
            });

            helper.WaitForClosed();

            await TestServices.WindowHelper.WaitForIdle();

            VERIFY_IS_FALSE(gridPointerPressedEvent.HasFired());
        }
Example #9
0
        private void TransForm_CloseRequested()
        {
            FlyoutBase flyout = FlyoutBase.GetAttachedFlyout(SP_TransForm);

            flyout.Hide();
        }