public static void CloseNowPlaying()
        {
            if (!IsActive)
            {
                return;
            }

            ModalSheetUtility.Hide(CurrentSheet);

            ScreenTimeoutHelper.OnNowPlayingClosed();
            Insights.Track("Closed Now Playing");
        }
        public static void OpenNowPlaying()
        {
            UiBlockerUtility.BlockNavigation();

            ModalSheetUtility.Show(CurrentSheet);

            App.SupressBackEvent += HardwareButtonsOnBackPressed;

            ScreenTimeoutHelper.OnNowPlayingOpened();
            Insights.Track("Opened Now Playing");
            IsActive = true;
        }
예제 #3
0
        private void AddToMenuFlyoutItem_OnClick(object sender, RoutedEventArgs e)
        {
            UiBlockerUtility.BlockNavigation();
            var picker = new PlaylistPicker(_song)
            {
                Action = async playlist =>
                {
                    App.SupressBackEvent -= AppOnSupressBackEvent;
                    UiBlockerUtility.Unblock();
                    ModalSheetUtility.Hide();
                    await App.Locator.CollectionService.AddToPlaylistAsync(playlist, _song).ConfigureAwait(false);
                }
            };

            App.SupressBackEvent += AppOnSupressBackEvent;
            ModalSheetUtility.Show(picker);
        }
예제 #4
0
 private void AppOnSupressBackEvent(object sender, BackPressedEventArgs backPressedEventArgs)
 {
     App.SupressBackEvent -= AppOnSupressBackEvent;
     UiBlockerUtility.Unblock();
     ModalSheetUtility.Hide();
 }