Exemple #1
0
        private async Task LoadImage()
        {
            if (imgScrollViewer.VerticalScrollBarVisibility != ScrollBarVisibility.Disabled)
            {
                imgScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Disabled;
            }
            if (img.RenderTransform is ScaleTransform)
            {
                var transform = img.RenderTransform as ScaleTransform; transform.ScaleX = 1; transform.ScaleY = 1;
            }

            CurrentImage = ImageCollection.AsQueryable().Skip(skip).Take(take).FirstOrDefault();
            if (CurrentImage == null)
            {
                skip -= 1; return;
            }
            await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.High, async() =>
            {
                img.Source = await SaveToImageSource(CurrentImage);
            });
        }