public PreviewSelfiePage() { _previewSelfieViewModel = new PreviewSelfieViewModel(NavigateService.GetNavigationData <BitmapImage>()); this.DataContext = _previewSelfieViewModel; InitializeComponent(); SetApplicationBar(); }
public DownloadPage() { _downloadNodeViewModel = new DownloadNodeViewModel(NavigateService.GetNavigationData <NodeViewModel>()); this.DataContext = _downloadNodeViewModel; InitializeComponent(); SetApplicationBar(); SetImageSize(); }
public MediaAlbumPage() { _mediaAlbumViewModel = new MediaAlbumViewModel(SdkService.MegaSdk, NavigateService.GetNavigationData <BaseMediaViewModel <PictureAlbum> >()); this.DataContext = _mediaAlbumViewModel; InitializeComponent(); SetApplicationBar(); InteractionEffectManager.AllowedTypes.Add(typeof(RadDataBoundListBoxItem)); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); NavigationService.RemoveBackEntry(); _originPage = NavigateService.GetNavigationData <Type>(); if (_originPage == null || _originPage == typeof(NodeDetailsPage) || _originPage == typeof(PreviewImagePage) || _originPage == typeof(PhotoCameraPage)) { _originPage = typeof(MainPage); } }
private void SetApplicationBar() { if (ApplicationBar == null) { ApplicationBar = (ApplicationBar)Resources["MediaAlbumMenu"]; } if (_mediaAlbumViewModel == null) { _mediaAlbumViewModel = new MediaAlbumViewModel(SdkService.MegaSdk, NavigateService.GetNavigationData <BaseMediaViewModel <PictureAlbum> >()); } // Change and translate the current application bar _mediaAlbumViewModel.ChangeMenu(this.ApplicationBar.Buttons, this.ApplicationBar.MenuItems); }
public NodeDetailsPage() { _nodeViewModel = NavigateService.GetNavigationData <NodeViewModel>(); _nodeDetailsViewModel = new NodeDetailsViewModel(this, _nodeViewModel); this.DataContext = _nodeDetailsViewModel; InitializeComponent(); SetApplicationBar(); // Subscribe to the NetworkAvailabilityChanged event DeviceNetworkInformation.NetworkAvailabilityChanged += new EventHandler <NetworkNotificationEventArgs>(NetworkAvailabilityChanged); LabelSize.Text = String.Concat(UiResources.UI_Size, ":"); LabelContent.Text = String.Concat(UiResources.UI_Content, ":"); LabelAdded.Text = String.Concat(UiResources.UI_Added, ":"); LabelModified.Text = String.Concat(UiResources.UI_Modified, ":"); }
private void OnLoaded(object sender, System.Windows.RoutedEventArgs e) { if (_mediaAlbumViewModel == null) { _mediaAlbumViewModel = new MediaAlbumViewModel(SdkService.MegaSdk, NavigateService.GetNavigationData <BaseMediaViewModel <PictureAlbum> >()); } if (_mediaAlbumViewModel.Pictures == null) { return; } var lastPicture = _mediaAlbumViewModel.Pictures.LastOrDefault(); if (lastPicture != null) { LstMediaItems.BringIntoView(lastPicture); } }
public PreviewImagePage() { _folderViewModel = NavigateService.GetNavigationData <FolderViewModel>(); _previewImageViewModel = new PreviewImageViewModel(SdkService.MegaSdk, App.AppInformation, _folderViewModel); this.DataContext = _previewImageViewModel; InitializeComponent(); SetApplicationBar((_folderViewModel == null) ? false : true); if (AppService.IsLowMemoryDevice()) { SlideViewAndFilmStrip.ItemRealizationMode = SlideViewItemRealizationMode.ViewportItem; } if (!DebugService.DebugSettings.IsDebugMode || !DebugService.DebugSettings.ShowMemoryInformation) { return; } MemoryControl.Visibility = Visibility.Visible; MemoryControl.StartMemoryCounter(); }