Esempio n. 1
0
        private async void ImageGalleryPage_OnLoaded(object sender, RoutedEventArgs e)
        {
            var data = await ImageLoaderService.GetImageGalleryDataAsync((await StorageLibrary.GetLibraryAsync(KnownLibraryId.Pictures)).SaveFolder);

            if (data != null)
            {
                imageGridView.ItemsSource = data;
            }
        }
Esempio n. 2
0
        private async void ImageGalleryPage_OnLoaded(object sender, RoutedEventArgs e)
        {
            if (SelectedContentFolder != null)
            {
                SelectedContentFolder.ContentsChanged += SelectedContentFolder_ContentsChanged;

                Source = await ImageLoaderService.GetImageGalleryDataAsync(SelectedContentFolder);

                if (Source != null)
                {
                    imagesGridView.ItemsSource = Source;
                }
            }
        }
Esempio n. 3
0
        public async Task AccessFolder(FolderItem folder)
        {
            if (folder is null)
            {
                return;
            }

            if (SelectedContentFolder != folder)
            {
                if (SelectedContentFolder is object)
                {
                    SelectedContentFolder.ContentsChanged -= SelectedContentFolder_ContentsChanged;
                }
                SelectedContentFolder = folder;
                SelectedContentFolder.ContentsChanged += SelectedContentFolder_ContentsChanged;
            }

            Source = await ImageLoaderService.GetImageGalleryDataAsync(SelectedContentFolder);

            if (Source != null)
            {
                imagesGridView.ItemsSource = Source;
            }
        }