Inheritance: IDownloadProgressEventArgs
Example #1
0
        private void SampleImage_DownloadProgress(object sender, Windows.UI.Xaml.Media.Imaging.DownloadProgressEventArgs e)
        {
            var bitmap = sender as BitmapImage;
            var image  = ImagesViewModel.Images.FirstOrDefault(o => o.Post.SampleUrl == bitmap.UriSource.OriginalString);

            if (image != null)
            {
                image.SampleLoadProgress = e.Progress;
            }
        }
 private void Illustration_DownloadProgress(object sender, DownloadProgressEventArgs e)
 {
     var bitmap = sender as BitmapImage;
     var progressBar = bitmap.GetValue(IllustrationView.BitmapLoadingIndicatorProperty) as ProgressBar;
     if (progressBar == null) return;
     progressBar.Value = e.Progress;
     if (e.Progress == 100)
     {
         var container = progressBar;//.Ge.GetVisualParent();
         if (container != null)
             container.Visibility = Visibility.Collapsed;
     }
 }
		private void Image_DownloadProgress(object sender, DownloadProgressEventArgs e)
		{
			var bitmap = sender as BitmapImage;
			var progressBar = bitmap.GetValue(BitmapLoadingIndicatorProperty) as ProgressBar;
			if (progressBar == null) return;
			progressBar.Value = e.Progress;
			if (e.Progress == 100)
			{
				var iv = progressBar.GetVisualParent();
				if (iv == null) return;
				var textContent = iv.FindName("TextContent") as TextBlock;
				var imageContent = iv.FindName("ImageContent") as Image;
				textContent.Opacity = 0;
				progressBar.Opacity = 0;
				//imageContent.Visibility = Windows.UI.Xaml.Visibility.Visible;
			}
		}
Example #4
0
 private void Bitmap_OnDownloadProgress(object sender, DownloadProgressEventArgs e)
 {
     DlProgress.Text = $"{e.Progress}%";
 }
Example #5
0
 private void RaiseDownloadProgress(DownloadProgressEventArgs args)
 {
     DownloadProgress?.Invoke(this, args);
 }