ClientQueue.Take()
blocks the UI thread. Also, WebClient
will want to raise the DownloadFileCompleted
event on the UI thread - but it is already blocked by ClientQueue.Take()
. You have a deadlock.
To resolve this, you got to move your blocking loop to another background thread.