This project is read-only.

Download progress to UI element

Mar 19, 2015 at 7:52 PM
I'm new to async and callbacks and I'm having a hard time getting the download progress from my download to update into a UI element.

My application is using the BeginOpenRead command with a few parameters passed into the BeginOpenReadCallback method so I know where to download the file to on my local machine.
conn.BeginOpenRead(pathToFile, new AsyncCallback(BeginOpenReadCallback), new AsyncArguments() {   Client = conn, FileName = PathToLocalFile  });
The problem I'm having is that I can not get the download progress (calculated in BeginOpenReadCallback) to get passed back or done something with so that I can update the progress bar on my GUI.

I found an old article on Code Project that had a "TransferProgress" object on the FtpClient object which probably would have been what I needed but that doesn't exist any more.