protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); ConnectedAnimation imageAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("image"); imageAnimation?.TryStart(HeaderImage); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); //Window.Current.SetTitleBar(null); var viewType = PomodoroView.Views.FirstOrDefault(t => t.Name == (SettingsService.Current.ViewType ?? string.Empty)); if (viewType == null) { viewType = PomodoroView.Views.FirstOrDefault(); } if (_pomodoroViewType != viewType) { ChangePomodoroContent(viewType); } _pomodoroViewType = viewType; ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("backAnimation"); if (animation != null) { animation.TryStart(PomodoroContent); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); NavigationMode = e.NavigationMode; KeyDown += OnKeyDownHandler; if (e != null && e.Parameter != null) { try { ConnectedAnimation imageAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("UserImage"); if (imageAnimation != null) { ImageAnimationExists = true; imageAnimation.TryStart(UserImage); } else { ImageAnimationExists = false; } } catch { } } }
//check protected override void OnNavigatedTo(NavigationEventArgs e) { DeckImage.Source = new BitmapImage(new Uri(BaseUri, App.viewModel.selectedDeck.Image)); DeckName.Text = App.viewModel.selectedDeck.Name; MasterToggle.IsChecked = App.viewModel.selectedDeck.Mastered; MarkToggle.IsChecked = App.viewModel.selectedDeck.Marked; PlayGrid.Visibility = Visibility.Collapsed; edite = false; ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("CoverImage"); //setting default card view to front if (animation != null) { animation.TryStart(DeckImage); } DetailFrame.Navigate(typeof(CardGridPage)); CardGridPage.front.ItemsSource = App.viewModel.cards; CardGridPage.back.ItemsSource = App.viewModel.cards; CardGridPage.front.Visibility = Visibility.Visible; CardGridPage.back.Visibility = Visibility.Collapsed; CardGridPage.front.IsMultiSelectCheckBoxEnabled = false; CardGridPage.back.IsMultiSelectCheckBoxEnabled = false; CardGridPage.front.SelectionMode = ListViewSelectionMode.None; CardGridPage.back.SelectionMode = ListViewSelectionMode.None; CardGridPage.front.IsItemClickEnabled = true; CardGridPage.back.IsItemClickEnabled = true; }
private void BasicGridView_ItemClick(object sender, ItemClickEventArgs e) { SaveState(); var gift = (e.ClickedItem as CustomDataObject); ConnectedAnimation animation = null; // Get the collection item corresponding to the clicked item. if (BasicGridView.ContainerFromItem(e.ClickedItem) is GridViewItem container) { // Stash the clicked item for use later. We'll need it when we connect back from the detailpage. _storedItem = container.Content; // Prepare the connected animation. // Notice that the stored item is passed in, as well as the name of the connected element. // The animation will actually start on the Detailed info page. animation = BasicGridView.PrepareConnectedAnimation("forwardAnimation", _storedItem, "connectedElement"); } SmokeGrid.DataContext = gift; SmokeGrid.Visibility = Visibility.Visible; animation.TryStart(destinationElement); }
protected override void OnNavigatedTo(NavigationEventArgs e) { ConnectedAnimation imageAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("videoThumb"); if (imageAnimation != null) { imageAnimation.TryStart(MediaElementContainer); } Constants.MainPageRef.contentFrame.Navigated += ContentFrame_Navigated; SystemNavigationManager.GetForCurrentView().BackRequested += VideoPage_BackRequested; Constants.MainPageRef.Frame.Navigated += Frame_Navigated; //Set the focus to the video viewer viewer.Focus(FocusState.Programmatic); //Get the video data and play it StartVideo(Constants.activeVideoID); //Update likes/dislikes LikeDislikeControl.UpdateData(); //Update comments if (CommentsOptionComboBox.SelectedIndex == 0) { UpdateComments(CommentThreadsResource.ListRequest.OrderEnum.Relevance); } else { UpdateComments(CommentThreadsResource.ListRequest.OrderEnum.Time); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); HasWon = (e.Parameter as bool? ?? false); if (HasWon) { Title = "I don't always play games"; Subtitle = "But when I do, I win!"; Image = WINNER; } else { Title = "KABOOM!"; Subtitle = "You lost!"; Image = BOMB; } ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("cat"); if (animation != null) { animation.TryStart(txtImage); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("projectView"); if (animation != null) { animation.TryStart(HeroImageCtl); } PreviousPage = e.SourcePageType; var project = e.Parameter as Project; if (project != null) { Project = project; // Set up the CollaboratorsBlock, since it can't be done with // just bindings CollaboratorsBlock.Text += String.Join(", ", Project.Collaborators.Select(c => c.Name)); } base.OnNavigatedTo(e); }
/// <summary>Edits the clicked MediaObject inside of the AdaptiveGridView.</summary> /// <param name="clickedItem">The clicked item.</param> private void EditCommand_ItemClicked(MediaObject clickedItem) { GetCurrentGrid(); switch (_storedItem.GetType().Name) { case "Game": _storedItemIndex = CreateObjectsViewModel.Games.IndexOf(clickedItem as Game); break; case "Image": _storedItemIndex = CreateObjectsViewModel.Images.IndexOf(clickedItem as Modell.ChallengeObjects.Image); break; case "Music": _storedItemIndex = CreateObjectsViewModel.Music.IndexOf(clickedItem as Music); break; } ConnectedAnimation animation = Collection.PrepareConnectedAnimation("forwardAnimation", _storedItem, "connectedElement"); SmokeGrid.Visibility = Visibility.Visible; ((SmokeGridChild.Children[0] as Grid).Children[0] as ImageEx).Source = _storedItem.URI; (SmokeGridChild.Children[1] as TextBox).Text = _storedItem.Name; animation.TryStart(SmokeGrid.Children[0]); }
internal void StartConnectedAnimation(ConnectedAnimation ani, string n) { if (FindName(n) is UIElement item) { ani.TryStart(item); } }
protected async void OnItemGridViewLoaded(object sender, RoutedEventArgs e) { if (_itemId != null) { var gridView = (GridView)sender; var items = gridView.ItemsSource as IEnumerable <NavigationInfo>; var item = items?.FirstOrDefault(s => s.UniqueId == _itemId); if (item != null) { gridView.ScrollIntoView(item); //if (NavigationRootPage.Current.IsFocusSupported) //{ // ((GridViewItem)gridView.ContainerFromItem(item))?.Focus(FocusState.Programmatic); //} ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("controlAnimation"); if (animation != null) { await gridView.TryStartConnectedAnimationAsync(animation, item, "controlRoot"); } } } }
public void StartExpandAnimation() { Task.Run(() => { Invoke(() => { ImageAlbumContainer.Visibility = Visibility.Visible; TextBlockSinger.Visibility = Visibility.Visible; TextBlockSongTitle.Visibility = Visibility.Visible; ConnectedAnimation anim1 = ConnectedAnimationService.GetForCurrentView().GetAnimation("SongTitle"); ConnectedAnimation anim2 = ConnectedAnimationService.GetForCurrentView().GetAnimation("SongImg"); ConnectedAnimation anim3 = ConnectedAnimationService.GetForCurrentView().GetAnimation("SongArtist"); anim3.Configuration = new DirectConnectedAnimationConfiguration(); if (anim2 != null) { anim2.Configuration = new DirectConnectedAnimationConfiguration(); } anim1.Configuration = new DirectConnectedAnimationConfiguration(); anim3?.TryStart(TextBlockSinger); anim1?.TryStart(TextBlockSongTitle); anim2?.TryStart(ImageAlbumContainer); }); }); }
protected async void OnItemGridViewLoaded(object sender, RoutedEventArgs e) { if (_itemId != null) { var gridView = (GridView)sender; var items = gridView.ItemsSource as IEnumerable <ControlInfoDataItem>; var item = items?.FirstOrDefault(s => s.UniqueId == _itemId); if (item != null) { gridView.ScrollIntoView(item); if (MainPage.Current.IsFocusSupported) { ((GridViewItem)gridView.ContainerFromItem(item))?.Focus(FocusState.Programmatic); } ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("controlAnimation"); if (animation != null) { // Setup the "basic" configuration if the API is present. if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7)) { animation.Configuration = new BasicConnectedAnimationConfiguration(); } await gridView.TryStartConnectedAnimationAsync(animation, item, "controlRoot"); } } } }
public void LoadExternalProfile(object e) { if (e is InstaUserShort userShort && userShort != null) { //UserDetailsVM = new UserDetailsViewModel(); //DataContext = UserDetailsVM; UserShort = userShort; UserShortFriendship = null; Username = null; //NavigationCacheMode = NavigationCacheMode.Disabled; //NavigationCacheMode = NavigationCacheMode.Required; try { ConnectedAnimation imageAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("UserImage"); if (imageAnimation != null) { ImageAnimationExists = true; //imageAnimation.Completed += ImageAnimationClose_Completed; //if (LatestGrid?.Name != InfoGrid.Name) // LatestGrid.Background = new SolidColorBrush(Helper.GetColorFromHex("#FF2E2E2E")); imageAnimation.TryStart(UserImage); //GridShadow.Visibility = GVSHOW.Visibility = Visibility.Collapsed; } else { ImageAnimationExists = false; } } catch { } }
private void OpenPage(object sender, ItemClickEventArgs e) { SelectedMenuItem = e.ClickedItem as MenuItem; ConnectedAnimation ca = MainMenu.PrepareConnectedAnimation("connect", e.ClickedItem, "ItemTitle"); Frame.Navigate(SelectedMenuItem.Page, null); }
public void LoadExternalProfile(object e) { if (e is InstaUserShort userShort && userShort != null) { ShowTVTab = false; UserShort = userShort; UserShortFriendship = null; Username = null; try { ConnectedAnimation imageAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("UserImage"); if (imageAnimation != null) { ImageAnimationExists = true; imageAnimation.TryStart(UserImage); } else { ImageAnimationExists = false; } } catch { } }
public void ButtonCollapse_OnClick(object sender, RoutedEventArgs e) { Common.PageExpandedPlayer.StartCollapseAnimation(); GridSongInfo.Visibility = Visibility.Visible; ConnectedAnimation anim1 = ConnectedAnimationService.GetForCurrentView().GetAnimation("SongTitle"); ConnectedAnimation anim2 = ConnectedAnimationService.GetForCurrentView().GetAnimation("SongImg"); ConnectedAnimation anim3 = ConnectedAnimationService.GetForCurrentView().GetAnimation("SongArtist"); anim3.Configuration = new DirectConnectedAnimationConfiguration(); if (anim2 != null) { anim2.Configuration = new DirectConnectedAnimationConfiguration(); } anim1.Configuration = new DirectConnectedAnimationConfiguration(); anim3?.TryStart(TbSingerName); anim1?.TryStart(TbSongName); if (AlbumImage.Visibility == Visibility.Visible) { anim2?.TryStart(AlbumImage); } ButtonExpand.Visibility = Visibility.Visible; ButtonCollapse.Visibility = Visibility.Collapsed; Common.PageExpandedPlayer.Dispose(); Common.PageExpandedPlayer = null; Common.PageMain.ExpandedPlayer.Content = new BlankPage(); //Common.PageMain.MainFrame.Visibility = Visibility.Visible; Common.PageMain.ExpandedPlayer.Visibility = Visibility.Collapsed; Common.PageMain.GridPlayBar.Background = Application.Current.Resources["SystemControlAcrylicElementMediumHighBrush"] as Brush; }
public selectedGoalPage() { this.InitializeComponent(); ConnectedAnimation imageAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("image"); if (imageAnimation != null) { titleBar.Opacity = 0; formGrid.Opacity = 0; goalImage.Opacity = 0; changeImageButton.Opacity = 0; // Wait for image opened. In future Insider Preview releases, this won't be necessary. goalImage.ImageOpened += (sender_, e_) => { goalImage.Opacity = 1; imageAnimation.TryStart(goalImage, new UIElement[] { titleBar, formGrid, changeImageButton }); titleBar.Opacity = 1; formGrid.Opacity = 1; changeImageButton.Opacity = 1; }; } }
protected override void LoadState(object parameter, Dictionary <string, object> pageState) { base.LoadState(parameter, pageState); ConnectedAnimation searchAniamtion = ConnectedAnimationService.GetForCurrentView().GetAnimation("Search"); if (searchAniamtion != null) { searchAniamtion.TryStart(Search); } if (parameter != null) { if (parameter is string query) { Search.Text = query; ViewModel = new SearchPageViewModel(); ViewModel.SearchTerm = query; ViewModel.SearchClick(); } else if (parameter is SearchPageViewModel) { ViewModel = parameter as SearchPageViewModel; } } }
protected override void OnNavigatedTo(NavigationEventArgs e) { if (e == null) { return; } base.OnNavigatedTo(e); ConnectedAnimation anim = ConnectedAnimationService.GetForCurrentView().GetAnimation("ForwardConnectedAnimation"); if (anim != null) { anim.TryStart(TransitionReceiver); } if (e.Parameter is IconItem ownIcon) { icon = ownIcon; SymbolIconXAMLCodeSample.Code = SampleTemplateProvider.GetXAMLSymbolIconCodeFromGlyph(icon.Name); SymbolIconCSCodeSample.Code = SampleTemplateProvider.GetCSSymbolIconCodeFromGlyph(icon.Name); ButtonSymbolIconXAMLCodeSample.Code = SampleTemplateProvider.GetXAMLButtonIconFromSymbolName(icon.Name); ButtonSymbolIconCSCodeSample.Code = SampleTemplateProvider.GetCSButtonIconFromSymbolName(icon.Name); FontIconXAMLCodeSample.Code = SampleTemplateProvider.GetXAMLFontIconCodeFromGlyph(icon.StringGlyph); FontIconCSCodeSample.Code = SampleTemplateProvider.GetCSFontIconCodeFromGlyph(icon.StringGlyph); ButtonFontIconXAMLCodeSample.Code = SampleTemplateProvider.GetXAMLButtonIconFromGlyph(icon.StringGlyph); ButtonFontIconCSCodeSample.Code = SampleTemplateProvider.GetCSButtonIconFromGlyph(icon.StringGlyph); CustomIconCode.Code = SampleTemplateProvider.GetXAMLCustomizedFontIconCode(icon.StringGlyph, FontIconColorPicker.Color.ToString(), ((int)CustomIconFontSize.Value).ToString()); Bindings.Update(); } }
private void Frame_Navigating(object sender, Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { object parameter = null; if (_nextParameter != null) { parameter = _nextParameter; } else { parameter = e.Parameter != null && !(e.Parameter is string str && string.IsNullOrEmpty(str)) ? e.Parameter : null; } var cas = ConnectedAnimationService.GetForCurrentView(); var page = (sender as Frame).Content as Page; var connectedAnimationsProps = Connected.GetPageConnectedAnimationProperties(page); foreach (var props in connectedAnimationsProps.Values) { ConnectedAnimation animation = null; if (props.IsListAnimation && parameter != null && ApiInformationHelper.IsCreatorsUpdateOrAbove) { foreach (var listAnimProperty in props.ListAnimProperties) { if (listAnimProperty.ListViewBase.ItemsSource is IEnumerable <object> items && items.Contains(parameter)) { try { animation = listAnimProperty.ListViewBase.PrepareConnectedAnimation(props.Key, parameter, listAnimProperty.ElementName); } catch { animation = null; } } } } else if (!props.IsListAnimation) { animation = cas.PrepareToAnimate(props.Key, props.Element); } else { continue; } if (animation != null && e.NavigationMode == Windows.UI.Xaml.Navigation.NavigationMode.Back && ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.Animation.DirectConnectedAnimationConfiguration")) { animation.Configuration = new DirectConnectedAnimationConfiguration(); } _previousPageConnectedAnimationProps[props.Key] = props; } }
private void EditItemView_Loaded(object sender, RoutedEventArgs e) { ConnectedAnimation noseAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("nose"); if (noseAnimation != null) { noseAnimation.TryStart(HeaderImage); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); //var test = AppCore.InstaApi.GetStoryFeedAsync(((InstaReelFeed)e.Parameter).User.Pk); if (e.Parameter is InstaReelFeed) { this.DataContext = ((InstaReelFeed)e.Parameter); var i = ((InstaReelFeed)e.Parameter); Flipviews.ItemsSource = i.Items; } if (e.Parameter is InstaStory) { this.DataContext = ((InstaStory)e.Parameter); var i = ((InstaStory)e.Parameter); Flipviews.ItemsSource = i.Items; } //for (int a = 0; a < i.Items.Count; a++) //{ // switch (i.Items[a].MediaType) // { // case 1: // SecondItemList.Add(6); // break; // case 2: // SecondItemList.Add(i.Items[a].VideoDuration); // break; // } //} //if(i.Items.Count > 0) //{ // _timer = new DispatcherTimer // { Interval = TimeSpan.FromSeconds(SecondItemList[0]) }; // _BarSecond.Maximum = (SecondItemList[0]); // Flipviews.ItemsSource = i.Items; // _timer.Tick += ChangeImage; // _value.Tick += ValueBar; // //Start the timer // //_timer.Start(); // //_value.Start(); //} ConnectedAnimation imageAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("image"); if (imageAnimation != null) { imageAnimation.TryStart(Frame); } }
/// <summary>Edits the clicked CrewMember inside of the AdaptiveGridView.</summary> /// <param name="clickedItem">The clicked item.</param> private void EditCommand_ItemClicked(CrewMember clickedCrew) { ConnectedAnimation animation = CrewGrid.PrepareConnectedAnimation("forwardAnimation", _storedMember, "connectedElement"); SmokeGrid.Visibility = Visibility.Visible; SmokeGridText.Text = _storedMember.CrewTag; animation.TryStart(SmokeGrid.Children[0]); }
public void AnimationEnter() { ConnectedAnimation imageAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("Poster"); if (imageAnimation != null) { imageAnimation.TryStart(Frame); } }
private async void ConnectAnimation_Completed(ConnectedAnimation sender, object args) { sender = null; if (!App.AppViewModel.IsVideoPageInit) { await Refresh(); } App.AppViewModel.IsVideoPageInit = true; UpdateLayout(); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("forwardAnimation"); if (animation != null) { //animation.TryStart(DestinationImage, new UIElement[] { MainContents }); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); ConnectedAnimation imageAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("avatar"); if (imageAnimation != null) { imageAnimation.TryStart(LogoImg); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { ViewModel.CurrentOperator = e.Parameter as Operator; ConnectedAnimation imageAnimation = ConnectedAnimationService.GetForCurrentView().GetAnimation("ForwardConnectedAnimation"); if (imageAnimation != null) { _ = imageAnimation.TryStart(OperatorImage, new UIElement[] { OperatorNameStackPanel, OperatorStarRatingControl }); } base.OnNavigatedTo(e); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); ConnectedAnimation ca = ConnectedAnimationService.GetForCurrentView().GetAnimation("connect"); if (ca != null) { ca.TryStart(PageTitle); } }