Example #1
0
        public async Task Initialize()
        {
            Recent = await _photoImporter.Get(0, 20);
            await LoadFavorites();

            MessagingCenter.Subscribe <GalleryViewModel>(this, "FavoritesAdded", (sender) =>
            {
                MainThread.BeginInvokeOnMainThread(async() =>
                {
                    await LoadFavorites();
                });
            });
        }
        public async Task Initialize()
        {
            var photos = await photoImporter.Get(0, 20, Quality.Low);

            Recent = photos;
            RaisePropertyChanged(nameof(Recent));

            await LoadFavorites();

            MessagingCenter.Subscribe <GalleryViewModel>(this, "FavoritesAdded", (sender) =>
            {
                MainThread.BeginInvokeOnMainThread(async() =>
                {
                    await LoadFavorites();
                });
            });
        }
Example #3
0
        private async Task Initialize()
        {
            IsBusy = true;
            Photos = await _photoImporter.Get(0, 20);

            Photos.CollectionChanged += Photos_CollectionChanged;
            await Task.Delay(3000);

            IsBusy = false;
        }
Example #4
0
        private async Task Initialize()
        {
            IsBusy = true;
            Photos = await photoImporter.Get(0, 20);

            RaisePropertyChanged(nameof(Photos));

            Photos.CollectionChanged += Photos_CollectionChanged;
            await Task.Delay(3000);

            IsBusy = false;
        }
Example #5
0
        private async Task Initialize()
        {
            IsBusy = true;
            Photos = await photoImporter.Get(0, 20);

            RaisePropertyChanged(nameof(Photo));
            Console.WriteLine($"The number of photos is {Photos.Count}");
            Photos.CollectionChanged += Photos_CollectionChanged;
            await Task.Delay(3000);

            IsBusy = false;
        }