Forum Xamarin.Forms


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Showing download percentage using HttpWebRequest and HttpWebResponse in windows, iOS and Android

How do I show percentage of the files that are being downloaded in parallel using HttpWebRequest and HttpWebResponse in Windows, iOS and Android platform?


  • Patil2421Patil2421 USMember ✭✭✭

    @mainprashant89 You need to use the DownloadProgressChangedEvent for this, which will provide the info about the downloaded data and the total data to be downloaded. Something like this, give a try:

    void WebClient_DownloadProgressChanged (object sender, DownloadProgressChangedEventArgs e)
                App.DownloadProgress = e.ProgressPercentage;
                if (e.TotalBytesToReceive > 0){
                    App.DownloadProgressDetails = "(" + (e.BytesReceived / 1024) + "KB/" + (e.TotalBytesToReceive / 1024) + "KB)";

    Convert this data to percentage and you can show this

Sign In or Register to comment.