Beispiel #1
0
        private async void CopyMenuFlyoutItem_Click(object sender, RoutedEventArgs e)
        {
            IBuffer imageBuffer = null;

            if (this.ReadingViewModel.Images.Count != 0 && this.ReadingViewModel.CurrentImageIndex != -1)
            {
                var source = this.ReadingViewModel.Images[this.ReadingViewModel.CurrentImageIndex].ImageSource;

                var hc = new HttpClient();
                imageBuffer = await hc.GetBufferAsync(new Uri(source));
            }

            await ClipboardService.CopyImageAsync(imageBuffer);
        }
Beispiel #2
0
        private async void CopyMenuFlyoutItem_Click(object sender, RoutedEventArgs e)
        {
            IBuffer imageBuffer = null;

            if (this.Image != null)
            {
                var source = this.Image.ImageSource;

                var hc = new HttpClient();
                imageBuffer = await hc.GetBufferAsync(new Uri(source));
            }

            await ClipboardService.CopyImageAsync(imageBuffer);
        }