internal static VideoViewerPage BuildPage(VideoInfoViewModel info) { var vm = new VideoViewerViewModel(info); var page = new VideoViewerPage() { ViewModel = vm, DataContext = vm }; Engines.ForEach(z => AppendToContextMenu(page.SeriesContextMenu, z)); return page; }
private void ExitVideoViewerPage(VideoViewerPage page) { page.ClickedGoBack -= this.VideoViewerPage_ClickedGoBack; page.ClickedOtherVideo -= this.VideoViewerPage_ClickedOtherVideo; Debug.Assert(page != null); page.ViewModel.InfoView.SeriesView.PropertiesRefreshed -= this.InfoView_PropertiesRefreshed; page.ViewModel.Flush(); this.CaptionTextBlock.Text = Caption; Debug.Assert(this.MainFrame.CanGoBack); this.MainFrame.GoBack(); this.MainPage.RefreshVideo(page.ViewModel.InfoView); }
private async void NavigateToVideoViewerPage(VideoInfoViewModel info) { var page = new VideoViewerPage(info); page.ClickedGoBack += this.VideoViewerPage_ClickedGoBack; page.ClickedOtherVideo += this.VideoViewerPage_ClickedOtherVideo; page.ViewModel.InfoView.SeriesView.PropertiesRefreshed += this.InfoView_PropertiesRefreshed; this.CaptionTextBlock.Text = Caption + " | " + info.SeriesView.NameViewModel.FirstLine; this.MainFrame.Navigate(page); await page.ViewModel.LoadAsync(); }