コード例 #1
0
ファイル: ReadingPage.xaml.cs プロジェクト: laplamgor/PRPR
        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);
        }
コード例 #2
0
ファイル: ImageView.xaml.cs プロジェクト: SettingDust/PRPR
        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);
        }