private void UpdateForVisualState(VisualState newState, VisualState oldState = null) { var isNarrow = newState == NarrowState; if (isNarrow && oldState == DefaultState) { // Resize down to the detail item. Don't play a transition. switch (_lastSelectedItem) { case (int)SelectedItems.Dishes: Frame.Navigate(typeof(DishesPage), _restaurant); break; case (int)SelectedItems.ToComment: Frame.Navigate(typeof(ToCommentPage), _restaurant); break; default: Frame.Navigate(typeof(CommentPage), _restaurant); break; } } //EntranceNavigationTransitionInfo.SetIsTargetElement(RestaurantDetailPage, isNarrow); if (DetailContentPresenter != null) { EntranceNavigationTransitionInfo.SetIsTargetElement(DetailContentPresenter, !isNarrow); } }
/// <summary> /// Method which handles the CurrentStateChanged event of VisualStateManager. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void VisualStateGroup_CurrentStateChanged(object sender, VisualStateChangedEventArgs e) { // Start Project Nirvash // TODO: Implement Narrow State //bool isNarrow = e.NewState == NarrowState; //if (isNarrow) //{ // NavigationService.Navigate(typeof(AttachmentsNarrowPage), DidactictItem, new SuppressNavigationTransitionInfo()); //} //else //{ // Stop Project Nirvash VisualStateManager.GoToState(this, MasterDetailsState.Name, true); MasterListView.SelectionMode = ListViewSelectionMode.Extended; MasterListView.SelectedItem = DidactictItem; // Start Project Nirvash //} //EntranceNavigationTransitionInfo.SetIsTargetElement(MasterListView, isNarrow); // Stop Project Nirvash if (DetailContentPresenter != null) { // Start Project Nirvash // ORG: EntranceNavigationTransitionInfo.SetIsTargetElement(DetailContentPresenter, !isNarrow); EntranceNavigationTransitionInfo.SetIsTargetElement(DetailContentPresenter, false); // Stop Project Nirvash } }
private void UpdateForVisualState(VisualState newState, VisualState oldState = null) { var isNarrow = newState == NarrowState; if (isNarrow && oldState == DefaultState && ItemList.getInstance().SelectedItem != null) { // Resize down to the detail item. Don't play a transition. Frame.Navigate(typeof(DetailPage), null, new SuppressNavigationTransitionInfo()); } EntranceNavigationTransitionInfo.SetIsTargetElement(MasterListView, isNarrow); if (DetailContentPresenter != null) { EntranceNavigationTransitionInfo.SetIsTargetElement(DetailContentPresenter, !isNarrow); } if (isNarrow) { shareButton.Visibility = Visibility.Collapsed; nextButton.Visibility = Visibility.Collapsed; prevButton.Visibility = Visibility.Collapsed; } else { shareButton.Visibility = Visibility.Visible; nextButton.Visibility = Visibility.Visible; prevButton.Visibility = Visibility.Visible; } }
private void UpdateForVisualState(VisualState newState, VisualState oldState = null) { var isNarrow = ((Frame)Window.Current.Content).ActualWidth < 720;//newState == NarrowState; if (isNarrow) { DetailContentPresenter.Visibility = Visibility.Collapsed; } else { DetailContentPresenter.Visibility = Visibility.Visible; } if (isNarrow && oldState == DefaultState && _lastSelectedItem != null) { // Resize down to the detail item. Don't play a transition. Frame.Navigate(typeof(DetailVideoPage), _lastSelectedItem, new SuppressNavigationTransitionInfo()); } EntranceNavigationTransitionInfo.SetIsTargetElement(MasterListView, isNarrow); if (DetailContentPresenter != null) { EntranceNavigationTransitionInfo.SetIsTargetElement(DetailContentPresenter, !isNarrow); } }
private void UpdateForVisualState(VisualState newState, VisualState oldState = null) { var isNarrow = newState == NarrowState; if (isNarrow && oldState == DefaultState && _lastSelectedItem != null) { // Resize down to the detail item. Don't play a transition. DetailFrame.Navigate(typeof(MemoDetailPage), _lastSelectedItem.Id, new SuppressNavigationTransitionInfo()); } EntranceNavigationTransitionInfo.SetIsTargetElement(MasterListView, isNarrow); }
private void UpdateForVisualState(VisualState newState, VisualState oldState) { var isNarrow = newState == movil; clsPersona p = viewModel.personaSeleccionada; if (isNarrow && oldState == monitor && p != null) { Frame.Navigate(typeof(Detail), p, new SuppressNavigationTransitionInfo()); } EntranceNavigationTransitionInfo.SetIsTargetElement(listaPersonas, isNarrow); }
private void UpdateForVisualState(VisualState newState, VisualState oldState = null) { var isNarrow = newState == NarrowState; if (isNarrow && oldState == DefaultState && ViewModel.SelectedOrder != null) { Frame.Navigate(typeof(OrderDetailPage), ViewModel.SelectedOrder, new SuppressNavigationTransitionInfo()); } EntranceNavigationTransitionInfo.SetIsTargetElement(OrdersOverViewListView, isNarrow); if (DetailContentPresenter != null) { EntranceNavigationTransitionInfo.SetIsTargetElement(DetailContentPresenter, !isNarrow); } }
private void UpdateForVisualState(VisualState newState, VisualState oldState = null) { var isNarrow = newState == NarrowState; if (isNarrow && oldState == DefaultState && _lastSelectedItem != null) { // Resize down to the detail item. Don't play a transition. App.RootFrame.Navigate(typeof(StickerDetailSelectionPage), null, new SuppressNavigationTransitionInfo()); } EntranceNavigationTransitionInfo.SetIsTargetElement(MasterListView, isNarrow); //if (DetailContentPresenter != null) //{ // EntranceNavigationTransitionInfo.SetIsTargetElement(DetailContentPresenter, !isNarrow); //} }
private void UpdateForVisualState(VisualState newState, VisualState oldState = null) { var isNarrow = newState == NarrowState; if (isNarrow && oldState == this.DefaultState && selectedNote != null) { // Resize down to the detail item. Don't play a transition. Frame.Navigate(typeof(DetailPage), this.selectedNote, new SuppressNavigationTransitionInfo()); } EntranceNavigationTransitionInfo.SetIsTargetElement(MasterListView, isNarrow); if (this.DetailContentPresenter != null) { EntranceNavigationTransitionInfo.SetIsTargetElement(DetailContentPresenter, !isNarrow); } }
private void UpdateForVisualState(VisualState newState, VisualState oldState = null) { var isNarrow = newState == VisualStateNarrow; if (isNarrow && oldState != VisualStateNarrow && _lastSelectedItem != null) { // Resize down to the detail item. Don't play a transition. //Frame.Navigate(typeof(WebViewPage), _lastSelectedItem.url, new SuppressNavigationTransitionInfo()); ViewModel.NavigationService.Navigate(typeof(WebViewPage), _lastSelectedItem.url, new SuppressNavigationTransitionInfo()); } EntranceNavigationTransitionInfo.SetIsTargetElement(MainPivot, isNarrow); if (MainWebView != null) { EntranceNavigationTransitionInfo.SetIsTargetElement(MainWebView, !isNarrow); } }
private void UpdateForVisualState(VisualState newState, VisualState oldState = null) { var isNarrow = newState == VisualStateNarrow; if (isNarrow && oldState == VisualStateNormal && _selectedAccount != null) { // Resize down to the detail item. Don't play a transition. //Frame.Navigate(typeof(DetailPage), _lastSelectedItem.ItemId, new SuppressNavigationTransitionInfo()); } EntranceNavigationTransitionInfo.SetIsTargetElement(MasterListView, isNarrow); if (DetailContentPresenter != null) { EntranceNavigationTransitionInfo.SetIsTargetElement(DetailContentPresenter, !isNarrow); } }
private void OnCurrentStateChanged(object sender, VisualStateChangedEventArgs e) { bool isNarrow = e.NewState == NarrowState; if (isNarrow) { Frame.Navigate(typeof(ApiDetails), apiItem, new SuppressNavigationTransitionInfo()); } else { VisualStateManager.GoToState(this, MasterDetailsState.Name, true); MasterListView.SelectionMode = ListViewSelectionMode.Extended; MasterListView.SelectedItem = apiItem; } EntranceNavigationTransitionInfo.SetIsTargetElement(MasterListView, isNarrow); }
private void UpdateForVisualState(VisualState newState, VisualState oldState = null) { if (newState == NarrowState && oldState == DefaultState && _lastSelectedItem != null) { // Resize down to the detail item. Don't play a transition. Frame.Navigate(typeof(DetailPage), 0, new SuppressNavigationTransitionInfo()); } else if (newState == DefaultState && oldState == NarrowState) { _lastSelectedItem = null; } var isNarrow = newState == NarrowState; EntranceNavigationTransitionInfo.SetIsTargetElement(MasterListView, isNarrow); Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, UpdateTitleBar); }
private void PageSizeStatesGroup_OnCurrentStateChanged(object sender, VisualStateChangedEventArgs e) { bool isNarrow = e.NewState == NarrowState; if (isNarrow) { Frame.Navigate(typeof(DetailsPage), selectedSystem, new SuppressNavigationTransitionInfo()); } else { VisualStateManager.GoToState(this, MasterDetailsState.Name, true); RemoteSystemListView.SelectedItem = selectedSystem; } EntranceNavigationTransitionInfo.SetIsTargetElement(RemoteSystemListView, isNarrow); if (DetailContentPresenter != null) { EntranceNavigationTransitionInfo.SetIsTargetElement(DetailContentPresenter, !isNarrow); } }
private void UpdateForVisualState(VisualState newState, VisualState oldState = null) { var isNarrow = newState == NarrowState; if (isNarrow && oldState == DefaultState && ViewModel.CurrentMix != null) { // Resize down to the detail item. Don't play a transition. Frame.Navigate(typeof(MixDetailPage), ViewModel.CurrentMix.InternalID, new SuppressNavigationTransitionInfo()); } if (!isNarrow && oldState == NarrowState && ViewModel.CurrentMix != null) { MasterListView.SelectedItem = ViewModel.CurrentMix; } EntranceNavigationTransitionInfo.SetIsTargetElement(MasterListView, isNarrow); if (DetailContentPresenter != null) { EntranceNavigationTransitionInfo.SetIsTargetElement(DetailContentPresenter, !isNarrow); } }